docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SplineGUI

    Contains IMGUI controls for editing Spline data.

    Inheritance
    object
    SplineGUI
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Splines
    Assembly: Unity.Splines.Editor.dll
    Syntax
    public static class SplineGUI

    Methods

    SplineIndexField(Rect, SerializedProperty, GUIContent, int)

    Creates a dropdown to select an index between 0 and .

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

    The rectangle on the screen to use for the field.

    SerializedProperty property

    A SerializedProperty that stores an integer value.

    GUIContent label

    The label to use for this property. If null, the property display name is used.

    int 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>(Rect, SerializedProperty, GUIContent, 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>(Rect rect, SerializedProperty property, GUIContent label, T container) where T : ISplineContainer
    Parameters
    Type Name Description
    Rect rect

    The rectangle on the screen to use for the field.

    SerializedProperty property

    A SerializedProperty that stores an integer value.

    GUIContent label

    The label to use for this property. If null, the property display name is used.

    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(Rect, string, int, int)

    Creates a dropdown to select an index between 0 and .

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

    The rectangle on the screen to use for the field.

    string label

    An optional prefix label.

    int index

    The current index.

    int splineCount

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

    Returns
    Type Description
    int

    The selected index.

    In This Article
    Back to top
    Copyright © 2024 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)