Class SplineGUI
Contains IMGUI controls for editing Spline data.
Inherited Members
Namespace: UnityEditor.Splines
Assembly: Unity.Splines.Editor.dll
Syntax
public static class SplineGUI
Methods
SplineIndexField(Rect, SerializedProperty, GUIContent, int)
Creates a dropdown to select an index between 0 and splineCount.
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. |
| int | splineCount | The number of splines available. In most cases, this is the size of Splines |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | An exception is thrown if |
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 container.
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 |
SplineIndexPopup(Rect, string, int, int)
Creates a dropdown to select an index between 0 and splineCount.
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. |
| 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. |