Class SplineGUILayout
Provides IMGUI controls to edit Spline data.
Inherited Members
Namespace: UnityEditor .Splines
Assembly: Unity.Splines.Editor.dll
Syntax
public static class SplineGUILayout
Methods
EmbeddedSplineDataField(GUIContent, SplineContainer, int, EmbeddedSplineDataType, string)
Creates a field for an embedded Spline
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. |
Spline |
container | The Spline |
int | index | |
Embedded |
type | The Embedded |
string | key | A string value used to identify and access embedded Spline |
Returns
Type | Description |
---|---|
bool | True if the property has children, is expanded, and includeChildren was set to false. Returns false otherwise. |
EmbeddedSplineDataField(SplineContainer, int, EmbeddedSplineDataType, string)
Creates a field for an embedded Spline
Declaration
public static bool EmbeddedSplineDataField(SplineContainer container, int index, EmbeddedSplineDataType type, string key)
Parameters
Type | Name | Description |
---|---|---|
Spline |
container | The Spline |
int | index | |
Embedded |
type | The Embedded |
string | key | A string value used to identify and access embedded Spline |
Returns
Type | Description |
---|---|
bool | True if the property has children, is expanded, and includeChildren was set to false. Returns false otherwise. |
SplineIndexField(SerializedProperty, int)
Creates a dropdown to select an index between 0 and splineCount
.
Declaration
public static void SplineIndexField(SerializedProperty property, int splineCount)
Parameters
Type | Name | Description |
---|---|---|
Serialized |
property | A SerializedProperty that stores an integer value. |
int | splineCount | The number of splines available. In most cases, this is the size of Splines |
Exceptions
Type | Condition |
---|---|
Argument |
An exception is thrown if |
SplineIndexField<T>(SerializedProperty, T)
Creates a dropdown to select an index between 0 and the count of Unitycontainer
.
Declaration
public static void SplineIndexField<T>(SerializedProperty property, T container) where T : ISplineContainer
Parameters
Type | Name | Description |
---|---|---|
Serialized |
property | A SerializedProperty that stores an integer value. |
T | container | A Spline |
Type Parameters
Name | Description |
---|---|
T | The type implementing ISpline |
Exceptions
Type | Condition |
---|---|
Argument |
An exception is thrown if |
SplineIndexPopup(string, int, int)
Creates a dropdown to select an index between 0 and splineCount
.
Declaration
public static int SplineIndexPopup(string label, int index, int splineCount)
Parameters
Type | Name | Description |
---|---|---|
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. |
SplineIndexPopup<T>(string, int, T)
Creates a dropdown to select a spline index relative to container
.
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. |
int | index | The current index. |
T | container | A Spline |
Returns
Type | Description |
---|---|
int | The selected index. |
Type Parameters
Name | Description |
---|---|
T | The type of ISpline |