Class EditorSplineUtility
Editor utility functions for working with Spline and Spline
Inherited Members
Namespace: UnityEditor .Splines
Assembly: Unity.Splines.Editor.dll
Syntax
public static class EditorSplineUtility
Properties
DefaultTangentMode
Represents the default TangentMode used to place or insert knots. If the user does not define tangent handles, then the tangent takes the default TangentMode.
Declaration
public static TangentMode DefaultTangentMode { get; }
Property Value
Type | Description |
---|---|
Tangent |
Methods
CopySplineDataIfEmpty(ISplineContainer, int, int, EmbeddedSplineDataType, string)
Copy an embedded Splinetype
and key
.
Declaration
public static bool CopySplineDataIfEmpty(ISplineContainer container, int source, int destination, EmbeddedSplineDataType type, string key)
Parameters
Type | Name | Description |
---|---|---|
ISpline |
container | The ISpline |
int | source | The index of the Spline in the |
int | destination | The index of the Spline in the |
Embedded |
type | |
string | key | A string value used to identify and access a Spline |
Returns
Type | Description |
---|---|
bool | True if data was copied, otherwise false. |
RegisterSplineDataChanged<T>(Action<SplineData<T>>)
Use this function to register a callback that gets invoked
once per-frame if any Spline
Declaration
public static void RegisterSplineDataChanged<T>(Action<SplineData<T>> action)
Parameters
Type | Name | Description |
---|---|---|
Action<Spline |
action | The callback to register. |
Type Parameters
Name | Description |
---|---|
T | The type parameter of Spline |
SetKnotPlacementTool()
Sets the current active context to the Spline
Declaration
public static void SetKnotPlacementTool()
UnregisterSplineDataChanged<T>(Action<SplineData<T>>)
Use this function to unregister Spline
Declaration
public static void UnregisterSplineDataChanged<T>(Action<SplineData<T>> action)
Parameters
Type | Name | Description |
---|---|---|
Action<Spline |
action | The callback to unregister. |
Type Parameters
Name | Description |
---|---|
T | The type parameter of Spline |
Events
AfterSplineWasModified
Invoked once per-frame if a spline property has been modified.
Declaration
public static event Action<Spline> AfterSplineWasModified