Class SplineGUI
Contains IMGUI controls for editing Spline data.
Inherited Members
Namespace: UnityEditor.Splines
Syntax
public static class SplineGUI
Methods
SplineIndexField(Rect, SerializedProperty, GUIContent, Int32)
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. |
| Int32 | 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, Int32, Int32)
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. |
| Int32 | index | The current index. |
| Int32 | splineCount | The number of splines available. In most cases, this is the size of Splines |
Returns
| Type | Description |
|---|---|
| Int32 | The selected index. |