docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct LayoutData

    Represents the layout of a GUI element in a custom editor.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.U2D.Path.GUIFramework
    Assembly: Unity.2D.Path.Editor.dll
    Syntax
    public struct LayoutData

    Fields

    distance

    The distance from the layout to the camera.

    Declaration
    public float distance
    Field Value
    Type Description
    float

    forward

    The layout's world-space forward vector.

    Declaration
    public Vector3 forward
    Field Value
    Type Description
    Vector3

    index

    The layout's index.

    Declaration
    public int index
    Field Value
    Type Description
    int

    position

    The layout's world-space position.

    Declaration
    public Vector3 position
    Field Value
    Type Description
    Vector3

    right

    The layout's world-space right vector.

    Declaration
    public Vector3 right
    Field Value
    Type Description
    Vector3

    up

    The layout's world-space up vector.

    Declaration
    public Vector3 up
    Field Value
    Type Description
    Vector3

    userData

    The layout's user data.

    Declaration
    public object userData
    Field Value
    Type Description
    object

    zero

    Zero definition of LayoutData.

    Declaration
    public static readonly LayoutData zero
    Field Value
    Type Description
    LayoutData

    Methods

    Nearest(LayoutData, LayoutData)

    Gets the layout that is closest to the camera,

    Declaration
    public static LayoutData Nearest(LayoutData currentData, LayoutData newData)
    Parameters
    Type Name Description
    LayoutData currentData

    The current layout.

    LayoutData newData

    The new layout to compare with.

    Returns
    Type Description
    LayoutData

    Returns the closest layout to the camera. If currentData is closest to the camera, returns currentData. Otherwise, if newData is closest to the camera, returns newData.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)