logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct PreviewElementHandle

    One built preview element: which authored element it is, and the container to hit-test it by.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    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
    In this article
    © 2026 Serenity. All Rights Reserved