Class SplineInstantiate
SplineInstantiate is used to automatically instantiate prefabs or objects along a spline.
Inherited Members
Namespace: UnityEngine .Splines
Assembly: solution.dll
Syntax
[ExecuteInEditMode]
[AddComponentMenu("Splines/Spline Instantiate")]
public class SplineInstantiate : SplineComponent
Properties
Name | Description |
---|---|
Container | The SplineContainer containing the targeted spline. |
Coordinate |
The coordinate space in which to orient the instanced object. |
Forward |
Forward axis of the object, by default set to the Z Axis |
Instantiate |
The instantiation method to use. |
Max |
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. |
Max |
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. |
Max |
Maximum (X,Y,Z) scale offset to randomize instanced objects scales. (X,Y and Z) values have to be higher to the ones of minScaleOffset. |
Max |
Maximum spacing between 2 generated instances, if equal to the minSpacing, then all instances will have the exact same spacing |
Min |
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. |
Min |
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. |
Min |
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. |
Min |
Minimum spacing between 2 generated instances, if equal to the maxSpacing, then all instances will have the exact same spacing. |
Position |
Coordinate space to use to offset positions of the instances. |
Rotation |
Coordinate space to use to offset rotations of the instances. |
Scale |
Coordinate space to use to offset rotations of the instances (usually OffsetSpace.Object). |
Seed | Value used to initialize the pseudorandom number generator of the created instances. |
Up |
Up axis of the object, by default set to the y-axis. |
items |
The items to use in the instantiation. |
Methods
Name | Description |
---|---|
Clear() | Clear all the created instances along the spline |
Randomize() | Change the Random seed to obtain a new generation along the Spline |
Set |
Set the created instances dirty to erase them next time instances will be generated (otherwise the next generation will reuse cached instances) |
Update |
Create and update all instances along the spline based on the list of available prefabs/objects. |