Struct PreviewElementHandle
One built preview element: which authored element it is, and the container to hit-test it by.
Inherited Members
Namespace: Serenity.Ui.Infrastructure.Editor.Preview
Assembly: Serenity.UnityUi.Infrastructure.Editor.dll
Syntax
public readonly struct PreviewElementHandle
Remarks
The container is the same UnityEngine.RectTransform UnityHudElementView.CreateContainer places,
scales and rotates — reading it back is what lets the preview's click handling and gizmo stay exact
instead of re-deriving placement themselves.
Constructors
PreviewElementHandle(int, RectTransform)
Creates a handle.
Declaration
public PreviewElementHandle(int elementIndex, RectTransform container)
Parameters
| Type | Name | Description |
|---|---|---|
| int | elementIndex | Index of the element within the HUD's element list. |
| RectTransform | container | The element's root container. |
Fields
Container
The element's root container, as built for this render.
Declaration
public readonly RectTransform Container
Field Value
| Type | Description |
|---|---|
| RectTransform |
ElementIndex
Index of the element within the HUD's element list.
Declaration
public readonly int ElementIndex
Field Value
| Type | Description |
|---|---|
| int |