docs.unity3d.com
    Show / Hide Table of Contents

    Class SerializedPropertyUtility

    Contains specialized utility functions for creating SerializedObject and SerializedProperty objects from SplineContainer, Spline, and SplineData<T>.

    Inheritance
    Object
    SerializedPropertyUtility
    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 SerializedPropertyUtility

    Methods

    ClearPropertyCache()

    Clear cached SerializedProperty objects. This is automatically called on every selection change. Use this function if you need to insert or remove properties that may have been cached earlier in the frame.

    Declaration
    public static void ClearPropertyCache()

    GetEmbeddedSplineDataProperty(SerializedProperty, EmbeddedSplineDataType, String)

    Create a SerializedProperty for a SplineData<T> value embedded in a Spline class. These are keyed collections of SplineData<T> that are managed by the Spline instance. See GetOrCreateIntData(String), GetOrCreateFloatData(String), etc.

    Declaration
    public static SerializedProperty GetEmbeddedSplineDataProperty(SerializedProperty splineProperty, EmbeddedSplineDataType type, string key)
    Parameters
    Type Name Description
    SerializedProperty splineProperty

    The SerializedProperty for the target Spline.

    EmbeddedSplineDataType type

    The EmbeddedSplineDataType.

    String key

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

    Returns
    Type Description
    SerializedProperty

    A SerializedProperty for the requested SplineData<T>, or null if not found.

    GetEmbeddedSplineDataProperty(SplineContainer, Int32, EmbeddedSplineDataType, String)

    Create a SerializedProperty for a SplineData<T> value embedded in a Spline class. These are keyed collections of SplineData<T> that are managed by the Spline instance. See GetOrCreateIntData(String), GetOrCreateFloatData(String), etc.

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

    The SplineContainer that contains the target Spline.

    Int32 index

    The index of the Spline in the Splines array.

    EmbeddedSplineDataType type

    The EmbeddedSplineDataType.

    String key

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

    Returns
    Type Description
    SerializedProperty

    A SerializedProperty for the requested SplineData<T>, or null if not found.

    GetSerializedObject(SplineContainer)

    Create a SerializedObject for a SplineContainer. This value is cached.

    Declaration
    public static SerializedObject GetSerializedObject(SplineContainer container)
    Parameters
    Type Name Description
    SplineContainer container

    The SplineContainer to create a SerializedObject for.

    Returns
    Type Description
    SerializedObject

    A SerializedObject for the requested SplineContainer, or null if container is null.

    GetSplineSerializedProperty(SerializedObject, Int32)

    Create a SerializedProperty for a Spline at the requested index in the Splines.

    Declaration
    public static SerializedProperty GetSplineSerializedProperty(SerializedObject splineContainer, int splineIndex)
    Parameters
    Type Name Description
    SerializedObject splineContainer

    The SplineContainer to reference.

    Int32 splineIndex

    The index of the Spline in the Splines array.

    Returns
    Type Description
    SerializedProperty

    A SerializedProperty for the requested Spline, or null if not found.

    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