### Circle Class Methods for Extrusion Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.ExtrusionShapes.Circle Implements the IExtrudeShape interface for the Circle class. Includes methods to get vertex positions for the extruded mesh and to set up the extrusion context. ```csharp namespace UnityEngine.Splines.ExtrusionShapes { [Serializable] public sealed class Circle : IExtrudeShape { // ... (other members) ... // Returns a 2D position for a vertex on the extruded ring. public float2 GetPosition(float t, int index) { // Implementation details for calculating circle vertex positions return default; } // Sets up the extrusion context with spline information. public void Setup(ISpline path, int segmentCount) { // Implementation details for setup } } } ``` -------------------------------- ### SplineToolContext.OnActivated Method Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEditor.Splines.SplineToolContext Invoked after this EditorToolContext becomes the active tool context in the Unity editor. This method can be used to perform setup actions when the spline tool is activated. ```csharp public override void OnActivated() ``` -------------------------------- ### SplineRange Indexer Example (C#) Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineRange Demonstrates how to use the indexer of SplineRange to access knot indices. The indexer handles the iteration direction, allowing for straightforward access regardless of whether the range is forward or backward. ```csharp // Create a new range into an existing Spline starting at knot 6, and interpolating the span of 3 knots. // range[0,1,2] will map to { 6, 5, 4 } respectively. var range = new SplineRange(6, 3, SplineDirection.Backward); ``` -------------------------------- ### Unity Splines: Get SmoothStepFloat Interpolator Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.InterpolatorUtility Provides an IInterpolator for smooth-step interpolation of float values. This method offers smoothing at both the start and end of the interpolation, creating a more natural easing effect. ```csharp public static IInterpolator SmoothStepFloat { get; } ``` -------------------------------- ### Object Methods Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineContainer Provides fundamental methods for object instantiation, destruction, and searching within the Unity engine. ```APIDOC ## Object Methods ### Description Base class for all objects Unity supports. Includes methods for object lifecycle management and identification. ### Inherited From Object ### Methods #### `GetInstanceID()` Returns the instance ID of the object. A unique identifier assigned by Unity. #### `GetHashCode()` Returns the hash code for this instance. #### `Equals(object obj)` Returns true if `obj` is equal to the this object. #### `InstantiateAsync(T original)` #### `InstantiateAsync(T original, Transform parent)` #### `InstantiateAsync(T original, Vector3 position, Quaternion rotation)` #### `InstantiateAsync(T original, Transform parent, Vector3 position, Quaternion rotation)` #### `InstantiateAsync(T original, int group)` #### `InstantiateAsync(T original, int group, Transform parent)` #### `InstantiateAsync(T original, int group, Vector3 position, Quaternion rotation)` #### `InstantiateAsync(T original, int group, ReadOnlySpan positions, ReadOnlySpan rotations)` #### `InstantiateAsync(T original, int group, Transform parent, Vector3 position, Quaternion rotation)` #### `InstantiateAsync(T original, int group, Transform parent, ReadOnlySpan positions, ReadOnlySpan rotations)` #### `InstantiateAsync(T original, InstantiateParameters parameters)` #### `InstantiateAsync(T original, int group, InstantiateParameters parameters)` #### `InstantiateAsync(T original, Vector3 position, Quaternion rotation, InstantiateParameters parameters)` #### `InstantiateAsync(T original, int group, Vector3 position, Quaternion rotation, InstantiateParameters parameters)` #### `InstantiateAsync(T original, int group, ReadOnlySpan positions, ReadOnlySpan rotations, InstantiateParameters parameters)` #### `Instantiate(Object original, Vector3 position, Quaternion rotation)` Creates a new instance of `original`. #### `Instantiate(Object original, Vector3 position, Quaternion rotation, Transform parent)` Creates a new instance of `original`. #### `Instantiate(Object original)` Creates a new instance of `original`. #### `Instantiate(Object original, Scene scene)` #### `Instantiate(T original, InstantiateParameters parameters)` #### `Instantiate(T original, Vector3 position, Quaternion rotation, InstantiateParameters parameters)` #### `Instantiate(Object original, Transform parent)` Creates a new instance of `original`. #### `Instantiate(Object original, Transform parent, bool instantiateInWorldSpace)` Creates a new instance of `original`. #### `Instantiate(T original)` Creates a new instance of `original`. #### `Instantiate(T original, Vector3 position, Quaternion rotation)` Creates a new instance of `original`. #### `Instantiate(T original, Vector3 position, Quaternion rotation, Transform parent)` Creates a new instance of `original`. #### `Instantiate(T original, Transform parent)` Creates a new instance of `original`. #### `Instantiate(T original, Transform parent, bool instantiateInWorldSpace)` Creates a new instance of `original`. #### `Destroy(Object obj, float t = 0.0F)` Destroys the object `obj` after `t` seconds. If `t` is 0, the object will be destroyed in the next frame. #### `Destroy(Object obj)` Destroys the object `obj`. If the object is a `Component`, `GameObject` or `Module`, it will be `Destroy`ed immediately. #### `DestroyImmediate(Object obj, bool allowDestroyingAssets = false)` Destroys the object immediately. You should use this with caution as it is not tracked by the engine. #### `DestroyImmediate(Object obj)` Destroys the object immediately. #### `FindObjectsOfType(Type type)` Returns a list of all active loaded objects of Type `type`. #### `FindObjectsOfType(Type type, bool includeAll)` Returns a list of all active loaded objects of Type `type`. #### `FindObjectsByType(Type type, FindObjectsSortMode sortMode)` #### `FindObjectsByType(Type type, FindObjectsInactive findObjectsInactive, FindObjectsSortMode sortMode)` #### `DontDestroyOnLoad(Object target)` By calling this method you can make a GameObject survive both loading of new scenes and not be destroyed when loading a new scene. #### `FindObjectsOfType()` Returns a list of all active loaded objects of Type `T`. #### `FindObjectsByType(FindObjectsSortMode sortMode)` #### `FindObjectsOfType(bool includeAll)` Returns a list of all active loaded objects of Type `T`. #### `FindObjectsByType(FindObjectsInactive findObjectsInactive, FindObjectsSortMode sortMode)` #### `FindObjectOfType()` Returns the first active object of Type `T` found in the scene. #### `FindObjectOfType(bool includeAll)` Returns the first active object of Type `T` found in the scene. #### `FindFirstObjectByType()` #### `FindAnyObjectByType()` #### `FindFirstObjectByType(FindObjectsInactive findObjectsInactive)` #### `FindAnyObjectByType(FindObjectsInactive findObjectsInactive)` #### `FindObjectOfType(Type type)` Returns the first active object of Type `type` found in the scene. #### `FindFirstObjectByType(Type type)` #### `FindAnyObjectByType(Type type)` ``` -------------------------------- ### Component Methods Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineComponent A comprehensive list of methods for interacting with and retrieving other components attached to the same GameObject. ```APIDOC ## Component Methods ### Description Methods for accessing and managing components on a GameObject. ### Methods #### `GetComponent(Type type)` Returns the component of the given type or an ancestor type. Returns null if there is no component of the given type. #### `GetComponent()` Returns the component of the given type or an ancestor type. Returns null if there is no component of the given type. #### `TryGetComponent(Type type, out Component component)` Gets the component of the given type, if it exists. #### `TryGetComponent(out T component)` Gets the component of the given type, if it exists. #### `GetComponent(string typeName)` Returns the component with the given type name. Returns null if there is no component of the given type. #### `GetComponentInChildren(Type type, bool includeInactive)` Returns the component of the given type in the hierarchy. Returns null if there is no component of the given type. #### `GetComponentInChildren(Type type)` Returns the component of the given type in the hierarchy. Returns null if there is no component of the given type. #### `GetComponentInChildren(bool includeInactive)` Returns the component of the given type in the hierarchy. Returns null if there is no component of the given type. #### `GetComponentInChildren()` Returns the component of the given type in the hierarchy. Returns null if there is no component of the given type. #### `GetComponentsInChildren(Type type, bool includeInactive)` Returns all the components of the given type in the hierarchy. Returns an empty array if there are no components of the given type. #### `GetComponentsInChildren(Type type)` Returns all the components of the given type in the hierarchy. Returns an empty array if there are no components of the given type. #### `GetComponentsInChildren(bool includeInactive)` Returns all the components of the given type in the hierarchy. Returns an empty array if there are no components of the given type. #### `GetComponentsInChildren(bool includeInactive, List results)` Returns all the components of the given type in the hierarchy. Appends the results to the provided list. #### `GetComponentsInChildren()` Returns all the components of the given type in the hierarchy. Returns an empty array if there are no components of the given type. #### `GetComponentsInChildren(List results)` Returns all the components of the given type in the hierarchy. Appends the results to the provided list. #### `GetComponentInParent(Type type, bool includeInactive)` Returns the component of the given type in the hierarchy. Returns null if there is no component of the given type. #### `GetComponentInParent(Type type)` Returns the component of the given type in the hierarchy. Returns null if there is no component of the given type. #### `GetComponentInParent(bool includeInactive)` Returns the component of the given type in the hierarchy. Returns null if there is no component of the given type. #### `GetComponentInParent()` Returns the component of the given type in the hierarchy. Returns null if there is no component of the given type. #### `GetComponentsInParent(Type type, bool includeInactive)` Returns all the components of the given type in the hierarchy. Returns an empty array if there are no components of the given type. #### `GetComponentsInParent(Type type)` Returns all the components of the given type in the hierarchy. Returns an empty array if there are no components of the given type. #### `GetComponentsInParent(bool includeInactive)` Returns all the components of the given type in the hierarchy. Returns an empty array if there are no components of the given type. #### `GetComponentsInParent(bool includeInactive, List results)` Returns all the components of the given type in the hierarchy. Appends the results to the provided list. #### `GetComponentsInParent()` Returns all the components of the given type in the hierarchy. Returns an empty array if there are no components of the given type. #### `GetComponents(Type type)` Returns all the components of the given type. Returns an empty array if there are no components of the given type. #### `GetComponents(Type type, List results)` Returns all the components of the given type. Appends the results to the provided list. #### `GetComponents(List results)` Returns all the components of the given type. Appends the results to the provided list. #### `GetComponents()` Returns all the components of the given type. Returns an empty array if there are no components of the given type. #### `GetComponentIndex()` Returns the index of the component within the GameObject. #### `CompareTag(string tag)` Is this game object tagged "tag"? #### `SendMessageUpwards(string methodName, object value, SendMessageOptions options)` Calls a method on this object and on all parents. #### `SendMessageUpwards(string methodName, object value)` Calls a method on this object and on all parents. #### `SendMessageUpwards(string methodName)` Calls a method on this object and on all parents. #### `SendMessageUpwards(string methodName, SendMessageOptions options)` Calls a method on this object and on all parents. #### `SendMessage(string methodName, object value)` Calls a method on this object. #### `SendMessage(string methodName)` Calls a method on this object. #### `SendMessage(string methodName, object value, SendMessageOptions options)` Calls a method on this object. #### `SendMessage(string methodName, SendMessageOptions options)` Calls a method on this object. #### `BroadcastMessage(string methodName, object parameter, SendMessageOptions options)` Calls a method on this object and on all children. #### `BroadcastMessage(string methodName, object parameter)` Calls a method on this object and on all children. #### `BroadcastMessage(string methodName)` Calls a method on this object and on all children. #### `BroadcastMessage(string methodName, SendMessageOptions options)` Calls a method on this object and on all children. ``` -------------------------------- ### Get Closed Property (C#) Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.ISpline Retrieves a boolean value indicating whether the spline is closed (forms an unbroken loop) or open (has distinct start and end points). This property is read-only. ```csharp bool Closed { get; } ``` -------------------------------- ### SplineData Constructors in C# Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineData-1 Demonstrates the different ways to instantiate a SplineData object. This includes creating an empty instance, initializing with a collection of data points, or with a single initial value. ```csharp // Create a new SplineData instance. public SplineData() // Create a new SplineData instance and initialize it with a collection of data points. public SplineData(IEnumerable> dataPoints) // Create a new SplineData instance with a single value in it. public SplineData(T init) ``` -------------------------------- ### Get Point at Linear Distance on Spline (C#) Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineUtility Calculates a 3D point on a spline at a specific linear distance from a starting interpolation ratio. It also returns the normalized interpolation ratio corresponding to the calculated point. Supports searching forwards or backwards along the spline. ```csharp public static float3 GetPointAtLinearDistance(this T spline, float fromT, float relativeDistance, out float resultPointT) where T : ISpline { // Calculates the 3D point on the spline at 'relativeDistance' from 'fromT'. // 'resultPointT' will be updated with the normalized interpolation ratio of the resulting point. // This is a placeholder for the actual implementation. resultPointT = default(float); return default(float3); } ``` -------------------------------- ### Constructors Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineKnotIndex Initializes a new instance of the SplineKnotIndex struct. ```APIDOC ## Constructor: SplineKnotIndex(int spline, int knot) ### Description Creates a new SplineKnotIndex to reference a knot. ### Parameters #### Path Parameters - **spline** (int) - Required - The spline index. - **knot** (int) - Required - The knot index. ### Request Example ```csharp SplineKnotIndex index = new SplineKnotIndex(0, 1); ``` ### Response Example ```json { "spline": 0, "knot": 1 } ``` ``` -------------------------------- ### Try Get Spline Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.EmbeddedSplineData Attempts to get a reference to the Spline described by the object. Returns true if successful, false otherwise. ```APIDOC ## TryGetSpline ### Description Attempt to get a reference to the Spline described by this object. Returns true if the Container and SplineIndex are valid, otherwise false. ### Method [Implicit - Method not explicitly defined in text, but implied by context of 'TryGetSpline'] ### Endpoint [N/A - This appears to be a method call within Unity's API, not a web endpoint] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example [N/A] ### Response #### Success Response - **bool** (bool) - Returns true if the Container and SplineIndex are valid, otherwise false. #### Response Example [N/A] ### Parameters - **spline** (Spline) - Required - A Spline if the Container and SplineIndex are valid, otherwise null. ``` -------------------------------- ### Object Methods Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineComponent Core methods inherited from Object, including instance management, comparison, and destruction. ```APIDOC ## Object Methods ### Description Core methods for managing object instances, identity, and lifecycle. ### Methods #### `GetInstanceID()` Returns the instance id of the object. Guaranteed to be unique between all clones. #### `GetHashCode()` Returns the hash code for this instance. #### `Equals(object other)` Returns true if the given object is the same as the current object. #### `InstantiateAsync(T prefab)` Creates a new instance of the object 'prefab' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, Transform parent)` Creates a new instance of the object 'prefab' as a child of 'parent' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, Vector3 position, Quaternion rotation)` Creates a new instance of the object 'prefab' at 'position' and 'rotation' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, Transform parent, Vector3 position, Quaternion rotation)` Creates a new instance of the object 'prefab' as a child of 'parent' at 'position' and 'rotation' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, int group)` Creates a new instance of the object 'prefab' in the specified 'group' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, int group, Transform parent)` Creates a new instance of the object 'prefab' in the specified 'group' as a child of 'parent' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, int group, Vector3 position, Quaternion rotation)` Creates a new instance of the object 'prefab' in the specified 'group' at 'position' and 'rotation' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, int group, ReadOnlySpan positions, ReadOnlySpan rotations)` Creates new instances of the object 'prefab' in the specified 'group' at the given 'positions' and 'rotations', returning them as an array. This is a coroutine that returns the instances when they are ready. #### `InstantiateAsync(T prefab, int group, Transform parent, Vector3 position, Quaternion rotation)` Creates a new instance of the object 'prefab' in the specified 'group' as a child of 'parent' at 'position' and 'rotation' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, int group, Transform parent, ReadOnlySpan positions, ReadOnlySpan rotations)` Creates new instances of the object 'prefab' in the specified 'group' as children of 'parent' at the given 'positions' and 'rotations', returning them as an array. This is a coroutine that returns the instances when they are ready. #### `InstantiateAsync(T prefab, InstantiateParameters parameters)` Creates a new instance of the object 'prefab' using the provided 'parameters' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, int group, InstantiateParameters parameters)` Creates a new instance of the object 'prefab' in the specified 'group' using the provided 'parameters' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, Vector3 position, Quaternion rotation, InstantiateParameters parameters)` Creates a new instance of the object 'prefab' at 'position' and 'rotation' using the provided 'parameters' and returns it. This is a coroutine that returns the instance when it's ready. #### `InstantiateAsync(T prefab, int group, Vector3 position, Quaternion rotation, InstantiateParameters parameters)` Creates a new instance of the object 'prefab' in the specified 'group' at 'position' and 'rotation' using the provided 'parameters' and returns it. This is a coroutine that returns the instance when it's ready. #### `Instantiate(Object original, Vector3 position, Quaternion rotation)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(Object original, Vector3 position, Quaternion rotation, Transform parent)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(Object original)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(Object original, Scene scene)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(T original, InstantiateParameters parameters)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(T original, Vector3 position, Quaternion rotation, InstantiateParameters parameters)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(Object original, Transform parent)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(Object original, Transform parent, bool instantiateInWorldSpace)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(T original)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(T original, Vector3 position, Quaternion rotation)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(T original, Vector3 position, Quaternion rotation, Transform parent)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(T original, Transform parent)` Returns a copy of the object original. Prefabs are recreated. #### `Instantiate(T original, Transform parent, bool instantiateInWorldSpace)` Returns a copy of the object original. Prefabs are recreated. #### `Destroy(Object obj, float t)` Destroys the object obj. If the living time is greater than 0, the object will be destroyed after t seconds. #### `Destroy(Object obj)` Destroys the object obj. #### `DestroyImmediate(Object obj, bool allowDestroyingAssets)` Destroys the object obj immediately. Object will be flagged for deletion. Note that this is generally not recommended, except for when you are sure that no other scripts are referencing the object anymore. #### `DestroyImmediate(Object obj)` Destroys the object obj immediately. Object will be flagged for deletion. Note that this is generally not recommended, except for when you are sure that no other scripts are referencing the object anymore. #### `FindObjectsOfType(Type type)` Returns a list of all active loaded objects of Type. #### `FindObjectsOfType(Type type, bool includeInactive)` Returns a list of all objects of Type active or inactive. Returns an empty list if no T is found. #### `FindObjectsByType(Type type, FindObjectsSortMode sortMode)` Returns a list of all active loaded objects of Type. #### `FindObjectsByType(Type type, FindObjectsInactive findObjectsInactive, FindObjectsSortMode sortMode)` Returns a list of all objects of Type active or inactive. #### `DontDestroyOnLoad(Object target)` By calling this method you can tell the Unity engine not to destroy any object when a new scene is loaded. #### `FindObjectsOfType()` Returns a list of all active loaded objects of Type. #### `FindObjectsByType(FindObjectsSortMode sortMode)` Returns a list of all active loaded objects of Type. #### `FindObjectsOfType(bool includeInactive)` Returns a list of all objects of Type active or inactive. Returns an empty list if no T is found. #### `FindObjectsByType(FindObjectsInactive findObjectsInactive, FindObjectsSortMode sortMode)` Returns a list of all objects of Type active or inactive. #### `FindObjectOfType()` Returns the first active object of Type. #### `FindObjectOfType(bool includeInactive)` Returns the first active object of Type. Returns null if no T is found. #### `FindFirstObjectByType()` Returns the first loaded object of Type. #### `FindAnyObjectByType()` Returns any loaded object of Type. #### `FindFirstObjectByType(FindObjectsInactive findObjectsInactive)` Returns the first loaded object of Type. #### `FindAnyObjectByType(FindObjectsInactive findObjectsInactive)` Returns any loaded object of Type. #### `FindObjectOfType(Type type)` Returns the first active object of Type. #### `FindFirstObjectByType(Type type)` Returns the first loaded object of Type. #### `FindAnyObjectByType(Type type)` Returns any loaded object of Type. #### `FindObjectOfType(Type type, bool includeInactive)` Returns the first active object of Type. Returns null if no T is found. ``` -------------------------------- ### Create BezierCurve from Tangents in C# Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.BezierCurve Creates a BezierCurve from start and end points along with their respective tangent directions. This method is useful for defining curves with specific directional controls at their endpoints. It requires four float3 arguments representing the start point, outgoing tangent from the start point, end point, and incoming tangent to the end point. ```csharp public static BezierCurve FromTangent(float3 pointA, float3 tangentOutA, float3 pointB, float3 tangentInB) ``` -------------------------------- ### SplineRange Constructor with Start and Count (C#) Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineRange Creates a new SplineRange with a specified start index and a count of elements. The count can be negative, implying a backward direction. ```csharp public SplineRange(int start, int count) ``` -------------------------------- ### BezierCurve Methods Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.BezierCurve Utility methods for BezierCurve, including hashing, inversion, and transformation. ```APIDOC ## BezierCurve.GetHashCode() ### Description Calculate a hash code for this curve. ### Method GET ### Endpoint `/websites/unity3d_packages_com_unity_splines_2_8/BezierCurve/GetHashCode` ### Returns #### Success Response (200) - **int** - A hash code for the curve. ### Response Example { "example": 123456789 } ``` ```APIDOC ## BezierCurve.GetInvertedCurve() ### Description Gets the same BezierCurve but in the opposite direction. ### Method GET ### Endpoint `/websites/unity3d_packages_com_unity_splines_2_8/BezierCurve/GetInvertedCurve` ### Returns #### Success Response (200) - **BezierCurve** - Returns the BezierCurve struct in the inverse direction. ### Response Example { "example": "BezierCurve { pointA: [0, 1, 0], tangentOutA: [1, 1, 0], pointB: [0, 0, 0], tangentInB: [1, 0, 0] }" } ``` ```APIDOC ## BezierCurve.Transform(matrix) ### Description Multiply the curve positions by a matrix. ### Method POST ### Endpoint `/websites/unity3d_packages_com_unity_splines_2_8/BezierCurve/Transform` ### Parameters #### Query Parameters - **matrix** (float4x4) - Required - The matrix to multiply. ### Request Body (Not applicable for this method signature as matrix is a query parameter) ### Response #### Success Response (200) - **BezierCurve** - A new BezierCurve multiplied by matrix. ### Response Example { "example": "BezierCurve { ... }" } ``` -------------------------------- ### SplineInstantiate Class Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineInstantiate Documentation for the SplineInstantiate class, including its properties and their descriptions. ```APIDOC ## SplineInstantiate Class ### Description The SplineInstantiate class is a component that allows for the instantiation of objects along a spline with various randomization and spacing options. ### Syntax ```csharp [ExecuteInEditMode] [AddComponentMenu("Splines/Spline Instantiate")] public class SplineInstantiate : SplineComponent ``` ### Properties #### Container - **Type**: `SplineContainer` - **Description**: The SplineContainer containing the targeted spline. - **Access**: `get; set;` #### CoordinateSpace - **Type**: `SplineInstantiate.Space` - **Description**: The coordinate space in which to orient the instanced object. - **Access**: `get; set;` #### ForwardAxis - **Type**: `SplineComponent.AlignAxis` - **Description**: Forward axis of the object, by default set to the Z Axis. - **Access**: `get; set;` #### InstantiateMethod - **Type**: `SplineInstantiate.Method` - **Description**: The instantiation method to use. - **Access**: `get; set;` #### MaxPositionOffset - **Type**: `Vector3` - **Description**: Maximum (X,Y,Z) position offset to randomize instanced objects positions. (X,Y and Z) values have to be higher to the ones of minPositionOffset. - **Access**: `get; set;` #### MaxRotationOffset - **Type**: `Vector3` - **Description**: Maximum (X,Y,Z) euler rotation offset to randomize instanced objects rotations. (X,Y and Z) values have to be higher to the ones of minRotationOffset. - **Access**: `get; set;` #### MaxScaleOffset - **Type**: `Vector3` - **Description**: Maximum (X,Y,Z) scale offset to randomize instanced objects scales. (X,Y and Z) values have to be higher to the ones of maxScaleOffset. - **Access**: `get; set;` #### MaxSpacing - **Type**: `float` - **Description**: Maximum spacing between 2 generated instances, if equal to the minSpacing, then all instances will have the exact same spacing. - **Access**: `get; set;` #### MinPositionOffset - **Type**: `Vector3` - **Description**: Minimum (X,Y,Z) position offset to randomize instanced objects positions. (X,Y and Z) values have to be lower to the ones of maxPositionOffset. - **Access**: `get; set;` #### MinRotationOffset - **Type**: `Vector3` - **Description**: Minimum (X,Y,Z) euler rotation offset to randomize instanced objects rotations. (X,Y and Z) values have to be lower to the ones of maxRotationOffset. - **Access**: `get; set;` #### MinScaleOffset - **Type**: `Vector3` - **Description**: Minimum (X,Y,Z) scale offset to randomize instanced objects scales. (X,Y and Z) values have to be lower to the ones of maxScaleOffset. - **Access**: `get; set;` #### MinSpacing - **Type**: `float` - **Description**: Minimum spacing between 2 generated instances, if equal to the maxSpacing, then all instances will have the exact same spacing. - **Access**: `get; set;` #### PositionSpace - **Type**: `SplineInstantiate.OffsetSpace` - **Description**: Coordinate space to use to offset positions of the instances. - **Access**: `get; set;` #### RotationSpace - **Type**: `SplineInstantiate.OffsetSpace` - **Description**: Coordinate space to use to offset rotations of the instances. - **Access**: `get; set;` #### ScaleSpace - **Type**: `SplineInstantiate.OffsetSpace` - **Description**: Coordinate space to use to offset rotations of the instances (usually OffsetSpace.Object). - **Access**: `get; set;` #### Seed - **Type**: `int` - **Description**: Value used to initialize the pseudorandom number generator of the created instances. - **Access**: `get; set;` #### UpAxis - **Type**: `SplineComponent.AlignAxis` - **Description**: Up axis of the object, by default set to the y-axis. - **Access**: `get; set;` ``` -------------------------------- ### SplineRange Constructor with Start, Count, and Direction (C#) Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineRange Creates a new SplineRange with a specified start index, count, and iteration direction. This allows explicit control over whether the range increments or decrements knot indices during iteration. ```csharp public SplineRange(int start, int count, SliceDirection direction) ``` -------------------------------- ### Component Methods Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineContainer Offers a comprehensive set of methods for accessing and manipulating components on a GameObject. ```APIDOC ## Component Methods ### Description A collection of utility methods for finding, getting, and interacting with other components attached to the same or other GameObjects. ### Inherited From Component ### Methods #### `GetComponent(Type type)` Returns the component of the given type if it exists on this GameObject, otherwise returns null. #### `GetComponent()` Returns the component of the given type if it exists on this GameObject, otherwise returns null. #### `TryGetComponent(Type type, out Component component)` Gets the component of the given type if it exists on this GameObject, otherwise returns null. #### `TryGetComponent(out T component)` Gets the component of the given type if it exists on this GameObject, otherwise returns null. #### `GetComponent(string type)` Returns the component of the given type if it exists on this GameObject, otherwise returns null. #### `GetComponentInChildren(Type t, bool includeInactive = false)` Returns the component of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentInChildren(Type t)` Returns the component of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentInChildren(bool includeInactive = false)` Returns the component of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentInChildren()` Returns the component of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentsInChildren(Type t, bool includeInactive = false)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentsInChildren(Type t)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentsInChildren(bool includeInactive = false)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentsInChildren(bool includeInactive, List results)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentsInChildren(List results)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its children, starting from the T:UnityEngine.GameObject. #### `GetComponentInParent(Type t, bool includeInactive = false)` Returns the component of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T:UnityEngine.GameObject. #### `GetComponentInParent(Type t)` Returns the component of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T:UnityEngine.GameObject. #### `GetComponentInParent(bool includeInactive = false)` Returns the component of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T:UnityEngine.GameObject. #### `GetComponentInParent()` Returns the component of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T:UnityEngine.GameObject. #### `GetComponentsInParent(Type t, bool includeInactive = false)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T:UnityEngine.GameObject. #### `GetComponentsInParent(Type t)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T:UnityEngine.GameObject. #### `GetComponentsInParent(bool includeInactive = false)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T: UnityEngine.GameObject. #### `GetComponentsInParent(bool includeInactive, List results)` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T: UnityEngine.GameObject. #### `GetComponentsInParent()` Returns all the components of the specified type in the T:UnityEngine.GameObject or any of its parents, starting from the T: UnityEngine.GameObject. #### `GetComponents(Type type)` Returns all the components of the specified type in the T:UnityEngine.GameObject. #### `GetComponents(Type type, List results)` Returns all the components of the specified type in the T:UnityEngine.GameObject. #### `GetComponents(List results)` Returns all the components of the specified type in the T:UnityEngine.GameObject. #### `GetComponents()` Returns all the components of the specified type in the T:UnityEngine.GameObject. #### `GetComponentIndex()` #### `CompareTag(string tag)` Is this game object tagged "tag"? #### `SendMessageUpwards(string methodName, object value, SendMessageOptions options = SendMessageOptions.RequireReceiver)` Calls a public method named `methodName` on every script attached to this GameObject and on all parents. #### `SendMessageUpwards(string methodName, object value)` Calls a public method named `methodName` on every script attached to this GameObject and on all parents. #### `SendMessageUpwards(string methodName)` Calls a public method named `methodName` on every script attached to this GameObject and on all parents. #### `SendMessageUpwards(string methodName, SendMessageOptions options)` Calls a public method named `methodName` on every script attached to this GameObject and on all parents. #### `SendMessage(string methodName, object value)` Calls a public method named `methodName` on every script attached to this GameObject. #### `SendMessage(string methodName)` Calls a public method named `methodName` on every script attached to this GameObject. #### `SendMessage(string methodName, object value, SendMessageOptions options)` Calls a public method named `methodName` on every script attached to this GameObject. #### `SendMessage(string methodName, SendMessageOptions options)` Calls a public method named `methodName` on every script attached to this GameObject. #### `BroadcastMessage(string methodName, object parameter, SendMessageOptions options = SendMessageOptions.RequireReceiver)` Calls a public method named `methodName` on every script attached to this GameObject. #### `BroadcastMessage(string methodName, object parameter)` Calls a public method named `methodName` on every script attached to this GameObject. #### `BroadcastMessage(string methodName)` Calls a public method named `methodName` on every script attached to this GameObject. #### `BroadcastMessage(string methodName, SendMessageOptions options)` Calls a public method named `methodName` on every script attached to this GameObject. ### Properties #### `transform` (Transform) The transform attached to this GameObject. #### `gameObject` (GameObject) The T:UnityEngine.GameObject this component is attached to. A component is always attached to a GameObject; therefore, this property is always valid. T:UnityEngine.GameObject #### `tag` (string) shortcut for Components.GameObject.tag. ``` -------------------------------- ### Evaluate Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.SplineContainer Gets the interpolated position, direction, and upDirection at ratio t for a spline. ```APIDOC ## Evaluate(T spline, float t, out float3 position, out float3 tangent, out float3 upVector) ### Description Gets the interpolated position, direction, and upDirection at ratio t for a spline. This method gets the three vectors faster than EvaluateSplinePosition, EvaluateSplineTangent and EvaluateSplineUpVector for the same time t, because it reduces some redundant computation. ### Method GET ### Endpoint N/A (This is a method within a class) ### Parameters #### Type Parameters - **T** (The spline type) - Description: The spline type. #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **spline** (T) - Required - The spline to evaluate. - **t** (float) - Required - A value between 0 and 1 that represents the ratio along the curve. - **position** (float3) - Output - The output variable for the float3 position at t. - **tangent** (float3) - Output - The output variable for the float3 tangent at t. - **upVector** (float3) - Output - The output variable for the float3 up direction at t. ### Returns #### Success Response (200) - **bool** - True if a valid set of output variables is computed and false otherwise. ### Response Example ```json { "success": true, "position": {"x": 1.0, "y": 2.0, "z": 3.0}, "tangent": {"x": 0.0, "y": 0.0, "z": 1.0}, "upVector": {"x": 0.0, "y": 1.0, "z": 0.0} } ``` ``` -------------------------------- ### IExtrudeShape Interface Documentation Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.IExtrudeShape Documentation for the IExtrudeShape interface, detailing its purpose, methods, and properties. ```APIDOC ## Interface IExtrudeShape ### Description Implement this interface to create a customized shape that can be extruded along a Spline using the `SplineMesh` class. This interface defines the contract for shapes used in spline-based mesh generation. ### Namespace `UnityEngine.Splines` ### Assembly `Unity.Splines.dll` ### Syntax ```csharp public interface IExtrudeShape ``` ### Methods #### Setup(ISpline, int) ##### Description Implement this function to access information about the `ISpline` path being extruded and the total number of segments. `SplineMesh` invokes this method once prior to extruding the mesh. ##### Declaration ```csharp void Setup(ISpline path, int segmentCount) ``` ##### Parameters - **path** (`ISpline`) - The spline path to extrude along. - **segmentCount** (`int`) - The total number of segments in the spline. #### SetSegment(int, float, float3, float3, float3) ##### Description Implement this function to access information about the spline path being extruded for each segment. `SplineMesh` invokes this method once before each ring of vertices is calculated. ##### Declaration ```csharp void SetSegment(int index, float t, float3 position, float3 tangent, float3 up) ``` ##### Parameters - **index** (`int`) - The segment index for the current vertex ring. - **t** (`float`) - The normalized interpolation ratio corresponding to the segment index. Equivalent to `index / (segmentCount - 1)`. - **position** (`float3`) - The position on the Spline path being extruded along at `t`. - **tangent** (`float3`) - The tangent on the Spline path being extruded along at `t`. - **up** (`float3`) - The up vector on the Spline path being extruded along at `t`. #### GetPosition(float, int) ##### Description This method is responsible for returning a 2D position of the template shape for each vertex of a single ring around the extruded mesh. Note that both interpolation `t` and `index` are provided as a convenience. ##### Declaration ```csharp float2 GetPosition(float t, int index) ``` ##### Parameters - **t** (`float`) - The normalized interpolation [0...1] for a vertex around an extruded ring. - **index** (`int`) - The index of the vertex in the extruded ring. ##### Returns - `float2`: A 2D position interpolated along a template shape to be extruded. This value will be converted to a 3D point and rotated to align with the spline at the current segment index. ### Properties #### SideCount ##### Description How many vertices make up a single ring around the mesh. ##### Declaration ```csharp int SideCount { get; } ``` ##### Property Value - **Type**: `int` - **Description**: How many vertices make up a revolution for each segment of the extruded mesh. ``` -------------------------------- ### LerpFloat Struct and Interpolate Method (C#) Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.Interpolators.LerpFloat The LerpFloat struct implements the IInterpolator interface for linear interpolation of float values. The Interpolate method takes a start value (a), an end value (b), and an interpolation ratio (t) to return the interpolated result. The start value is returned when t is 0, and the end value is returned when t is 1. ```csharp public struct LerpFloat : IInterpolator { public float Interpolate(float a, float b, float t) { return a + (b - a) * t; } } ``` -------------------------------- ### SmoothStepFloat4 Interpolation in C# Source: https://docs.unity3d.com/Packages/com.unity.splines@2.8/Packages/com.unity.splines%402.8/api/UnityEngine.Splines.Interpolators.SmoothStepFloat4 The `Interpolate` method within the `SmoothStepFloat4` struct performs a smooth interpolation between two `float4` values. It takes a start value `a`, an end value `b`, and an interpolation ratio `t`. The interpolation features smoothing at the start and end, similar to `Lerp` but with gradual acceleration and deceleration, suitable for natural animations and transitions. ```csharp public float4 Interpolate(float4 a, float4 b, float t) { // Implementation details for smooth step interpolation // This method is part of the IInterpolator interface. // The actual code for smoothing is not provided in the source text. return default(float4); // Placeholder for actual implementation } ```