docs.unity3d.com
    Show / Hide Table of Contents

    Class SplineIndexPropertyDrawer

    A PropertyDrawer used to show a popup menu with available spline indices relative to a ISplineContainer. Add SplineIndexAttribute to a serialized integer type to use.

    Inheritance
    Object
    GUIDrawer
    PropertyDrawer
    SplineIndexPropertyDrawer
    Inherited Members
    PropertyDrawer.CreatePropertyGUI(SerializedProperty)
    PropertyDrawer.CanCacheInspectorGUI(SerializedProperty)
    PropertyDrawer.attribute
    PropertyDrawer.fieldInfo
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.Splines
    Syntax
    [CustomPropertyDrawer(typeof(SplineIndexAttribute))]
    public class SplineIndexPropertyDrawer : PropertyDrawer

    Methods

    GetPropertyHeight(SerializedProperty, GUIContent)

    Returns the height of a SerializedProperty in pixels.

    Declaration
    public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
    Parameters
    Type Name Description
    SerializedProperty property

    The SerializedProperty to calculate height for.

    GUIContent label

    The label of the SerializedProperty.

    Returns
    Type Description
    Single

    Returns the height of a SerializedProperty in pixels.

    Overrides
    PropertyDrawer.GetPropertyHeight(SerializedProperty, GUIContent)

    OnGUI(Rect, SerializedProperty, GUIContent)

    Creates an interface for a SerializedProperty with an integer property type.

    Declaration
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    Parameters
    Type Name Description
    Rect position

    Rectangle on the screen to use for the property GUI.

    SerializedProperty property

    The SerializedProperty to make the custom GUI for.

    GUIContent label

    The label of this property.

    Overrides
    PropertyDrawer.OnGUI(Rect, SerializedProperty, GUIContent)
    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