docs.unity3d.com
    Show / Hide Table of Contents

    Class SplineGUILayout

    Provides IMGUI controls to edit Spline data.

    Inheritance
    Object
    SplineGUILayout
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.Splines
    Syntax
    public static class SplineGUILayout

    Methods

    EmbeddedSplineDataField(GUIContent, SplineContainer, Int32, EmbeddedSplineDataType, String)

    Creates a field for an embedded SplineData<T> property. Embedded SplineData<T> is stored in the Spline class and can be accessed through a string key value. Use this function to expose an embedded SplineData<T> through the Inspector.

    Declaration
    public static bool EmbeddedSplineDataField(GUIContent label, SplineContainer container, int index, EmbeddedSplineDataType type, string key)
    Parameters
    Type Name Description
    GUIContent label

    An optional prefix label.

    SplineContainer container

    The SplineContainer that holds the Spline target.

    Int32 index

    The index of the target Spline in the Splines array.

    EmbeddedSplineDataType type

    The EmbeddedSplineDataType type of data stored in the embedded SplineData<T>

    String key

    A string value used to identify and access embedded SplineData<T>.

    Returns
    Type Description
    Boolean

    True if the property has children, is expanded, and includeChildren was set to false. Returns false otherwise.

    EmbeddedSplineDataField(SplineContainer, Int32, EmbeddedSplineDataType, String)

    Creates a field for an embedded SplineData<T> property. Embedded SplineData<T> is stored in the Spline class and can be accessed through a string key value. Use this function to expose an embedded SplineData<T> through the Inspector.

    Declaration
    public static bool EmbeddedSplineDataField(SplineContainer container, int index, EmbeddedSplineDataType type, string key)
    Parameters
    Type Name Description
    SplineContainer container

    The SplineContainer that holds the Spline target.

    Int32 index

    The index of the target Spline in the Splines array.

    EmbeddedSplineDataType type

    The EmbeddedSplineDataType type of data stored in the embedded SplineData<T>

    String key

    A string value used to identify and access embedded SplineData<T>.

    Returns
    Type Description
    Boolean

    True if the property has children, is expanded, and includeChildren was set to false. Returns false otherwise.

    SplineIndexField(SerializedProperty, Int32)

    Creates a dropdown to select an index between 0 and .

    Declaration
    public static void SplineIndexField(SerializedProperty property, int splineCount)
    Parameters
    Type Name Description
    SerializedProperty property

    A SerializedProperty that stores an integer value.

    Int32 splineCount

    The number of splines available. In most cases, this is the size of Splines

    Exceptions
    Type Condition
    ArgumentException

    An exception is thrown if is not an integer field.

    SplineIndexField<T>(SerializedProperty, T)

    Creates a dropdown to select an index between 0 and the count of UnityEditor.Splines contained in the provided .

    Declaration
    public static void SplineIndexField<T>(SerializedProperty property, T container)
        where T : ISplineContainer
    Parameters
    Type Name Description
    SerializedProperty property

    A SerializedProperty that stores an integer value.

    T container

    A SplineContainer that determines how many splines are available in the popup selector.

    Type Parameters
    Name Description
    T

    The type implementing ISplineContainer.

    Exceptions
    Type Condition
    ArgumentException

    An exception is thrown if is not an integer field.

    SplineIndexPopup(String, Int32, Int32)

    Creates a dropdown to select an index between 0 and .

    Declaration
    public static int SplineIndexPopup(string label, int index, int splineCount)
    Parameters
    Type Name Description
    String label

    An optional prefix label.

    Int32 index

    The current index.

    Int32 splineCount

    The number of splines available. In most cases, this is the size of Splines

    Returns
    Type Description
    Int32

    The selected index.

    SplineIndexPopup<T>(String, Int32, T)

    Creates a dropdown to select a spline index relative to .

    Declaration
    public static int SplineIndexPopup<T>(string label, int index, T container)
        where T : ISplineContainer
    Parameters
    Type Name Description
    String label

    An optional prefix label.

    Int32 index

    The current index.

    T container

    A SplineContainer that determines how many splines are available in the popup selector.

    Returns
    Type Description
    Int32

    The selected index.

    Type Parameters
    Name Description
    T

    The type of ISplineContainer.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023