Particle Playground - Script Reference
3.0.1
Framework for controlling particles in the Unity Engine.
|
Holds information about a spline and contains functions for working with the nodes and bezier handles. More...
Public Member Functions | |
bool | IsReady () |
bool | AddUser (Transform thisTransform) |
Adds a user to the spline. This helps keeping track of which objects are using the spline. More... | |
bool | RemoveUser (Transform thisTransform) |
Removes a user from the spline. This helps keeping track of which objects are using the spline. More... | |
bool | HasUser (Transform thisTransform) |
Determines whether this spline has the user of passed in transform. More... | |
Vector3 | GetControlPoint (int index) |
Gets the control point. More... | |
void | SetControlPoint (int index, Vector3 point, Vector3 offset) |
Sets the control point and withdraws the offset. More... | |
void | SetControlPoint (int index, Vector3 point) |
Sets the control point. More... | |
void | SetPoints (Vector3[] vectors) |
Sets all points from an array. Please ensure the same length of your passed in vectors as PlaygroundSpline.ControlPointCount. More... | |
bool | PointHasTransform (int index) |
void | TranslateSpline (Vector3 translation) |
Moves the entire spline separate from its transform component. Use this if you'd like to offset the spline from its transform separately from the positionOffset. More... | |
Vector3 | GetTransformPosition () |
Quaternion | GetTransformRotation () |
Vector3 | GetTransformScale () |
BezierControlPointMode | GetControlPointMode (int index) |
void | SetControlPointMode (int index, BezierControlPointMode mode) |
Vector3 | GetPoint (float t) |
Get position from time. More... | |
Vector3 | GetVelocity (float t) |
Vector3 | GetPoint (int index) |
Get position from node index in the spline. If the node consists of an available transform its position will be returned, otherwise the user-specified Vector3 position. More... | |
Vector3 | GetInversePoint (int index) |
Vector3 | GetPointWorldSpace (int index) |
float | ClosestTimeFromPoint (Vector3 aP) |
Vector3 | ClosestPointFromPosition (Vector3 aP) |
Vector3 | GetDirection (float t) |
void | AddNode () |
Adds a node at the last position of the node index. More... | |
void | AddNode (int index) |
Adds a node at specified node index. More... | |
void | RemoveFirst () |
Removes the first node in the node index. More... | |
void | RemoveLast () |
Removes the last node in the node index. More... | |
void | RemoveNode (int index) |
Removes a node at specified node index. More... | |
void | ReverseAllNodes () |
Reverses all nodes in the node index. More... | |
void | SwapNodes (int from, int to) |
Transform[] | ExportToTransforms () |
Exports all nodes to Transform[]. Enable exportWithNodeStructure to parent each bezier handle to their node. More... | |
Vector3[] | ExportToVector3 () |
Exports all nodes to Vector3[]. More... | |
void | Reset () |
Reset this Playground Spline. Two nodes and two bezier handles will be created. More... | |
Public Attributes | |
List< TransformNode > | transformNodes = new List<TransformNode>() |
The list of transform nodes to set positions live of an existing node. More... | |
bool | reverse |
Determines if the spline time should be reversed. If you'd like to physically reverse the arrays making the spline then call ReverseAllNodes(). More... | |
float | timeOffset |
The time offset of the spline. More... | |
Vector3 | positionOffset |
The position offset of the spline in relation to its transform. More... | |
Transform | splineTransform |
Matrix4x4 | splineTransformMx |
List< Transform > | usedBy = new List<Transform>() |
float | fixedVelocityOnNewNode = .5f |
bool | moveTransformsAsBeziers = false |
bool | exportWithNodeStructure = false |
bool | drawGizmo = true |
float | bezierWidth = 2f |
Static Public Attributes | |
static bool | drawSplinePreviews = true |
Properties | |
bool | Loop [get, set] |
Gets or sets a value indicating whether this PlaygroundSplines.PlaygroundSpline is set to loop. More... | |
int | ControlPointCount [get] |
Gets the control point count. More... | |
int | NodeCount [get] |
Holds information about a spline and contains functions for working with the nodes and bezier handles.
void PlaygroundSplines.PlaygroundSpline.AddNode | ( | ) |
Adds a node at the last position of the node index.
void PlaygroundSplines.PlaygroundSpline.AddNode | ( | int | index | ) |
Adds a node at specified node index.
index | Index. |
bool PlaygroundSplines.PlaygroundSpline.AddUser | ( | Transform | thisTransform | ) |
Adds a user to the spline. This helps keeping track of which objects are using the spline.
true
, if user was added, false
otherwise..
Transform [] PlaygroundSplines.PlaygroundSpline.ExportToTransforms | ( | ) |
Exports all nodes to Transform[]. Enable exportWithNodeStructure to parent each bezier handle to their node.
Vector3 [] PlaygroundSplines.PlaygroundSpline.ExportToVector3 | ( | ) |
Exports all nodes to Vector3[].
Vector3 PlaygroundSplines.PlaygroundSpline.GetControlPoint | ( | int | index | ) |
Gets the control point.
index | Index. |
Vector3 PlaygroundSplines.PlaygroundSpline.GetPoint | ( | float | t | ) |
Get position from time.
t | Time. |
Vector3 PlaygroundSplines.PlaygroundSpline.GetPoint | ( | int | index | ) |
Get position from node index in the spline. If the node consists of an available transform its position will be returned, otherwise the user-specified Vector3 position.
index | Index. |
bool PlaygroundSplines.PlaygroundSpline.HasUser | ( | Transform | thisTransform | ) |
Determines whether this spline has the user of passed in transform.
true
if this spline has the user of the passed in transform; otherwise, false
.thisTransform | This transform. |
void PlaygroundSplines.PlaygroundSpline.RemoveFirst | ( | ) |
Removes the first node in the node index.
void PlaygroundSplines.PlaygroundSpline.RemoveLast | ( | ) |
Removes the last node in the node index.
void PlaygroundSplines.PlaygroundSpline.RemoveNode | ( | int | index | ) |
Removes a node at specified node index.
index | Index. |
bool PlaygroundSplines.PlaygroundSpline.RemoveUser | ( | Transform | thisTransform | ) |
Removes a user from the spline. This helps keeping track of which objects are using the spline.
true
, if user was removed, false
otherwise..
void PlaygroundSplines.PlaygroundSpline.Reset | ( | ) |
Reset this Playground Spline. Two nodes and two bezier handles will be created.
void PlaygroundSplines.PlaygroundSpline.ReverseAllNodes | ( | ) |
Reverses all nodes in the node index.
void PlaygroundSplines.PlaygroundSpline.SetControlPoint | ( | int | index, |
Vector3 | point, | ||
Vector3 | offset | ||
) |
Sets the control point and withdraws the offset.
index | Index. |
point | Point. |
offset | Offset. |
void PlaygroundSplines.PlaygroundSpline.SetControlPoint | ( | int | index, |
Vector3 | point | ||
) |
Sets the control point.
index | Index. |
point | Position. |
void PlaygroundSplines.PlaygroundSpline.SetPoints | ( | Vector3[] | vectors | ) |
Sets all points from an array. Please ensure the same length of your passed in vectors as PlaygroundSpline.ControlPointCount.
vectors | Vectors. |
void PlaygroundSplines.PlaygroundSpline.TranslateSpline | ( | Vector3 | translation | ) |
Moves the entire spline separate from its transform component. Use this if you'd like to offset the spline from its transform separately from the positionOffset.
translation | The amount to move the spline in Units. |
Vector3 PlaygroundSplines.PlaygroundSpline.positionOffset |
The position offset of the spline in relation to its transform.
bool PlaygroundSplines.PlaygroundSpline.reverse |
Determines if the spline time should be reversed. If you'd like to physically reverse the arrays making the spline then call ReverseAllNodes().
float PlaygroundSplines.PlaygroundSpline.timeOffset |
The time offset of the spline.
List<TransformNode> PlaygroundSplines.PlaygroundSpline.transformNodes = new List<TransformNode>() |
The list of transform nodes to set positions live of an existing node.
|
get |
Gets the control point count.
The control point count.
|
getset |
Gets or sets a value indicating whether this PlaygroundSplines.PlaygroundSpline is set to loop.
true
if set to loop; otherwise, false
.