Class SerializedPropertyUtility
Contains specialized utility functions for creating SerializedObject and SerializedProperty objects from SplineContainer, Spline, and SplineData<T>.
Inherited Members
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 | |
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 | |
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)
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. |