GeneratedPositioning
A class in Root.Township, the global namespace.
Asset that adjusts a generated object's position and rotation through position and rotation modules. Used by StaticGeneration and StaticDynamicSpawner.
- Listed in Global namespace: E to H
- Inherits or implements
ScriptableObject - Derived types
GeneratedPositioning.Create - Nested types
Create,Module,PositionModule,RotationModule - Attributes
CreateAssetMenu
Constructors
| Member | What it is |
|---|---|
GeneratedPositioning() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private GeneratedPositioning.PositionModule position | Which position module type is picked in the inspector. |
private GeneratedPositioning.Module positionModule | Module that changes the position, or null for none. |
private static Dictionary<GeneratedPositioning.PositionModule, Type> positionTypes | Maps each position module choice to its class (Static has none). |
private GeneratedPositioning.RotationModule rotation | Which rotation module type is picked in the inspector. |
private GeneratedPositioning.Module rotationModule | Module that changes the rotation, or null for none. |
private static Dictionary<GeneratedPositioning.RotationModule, Type> rotationTypes | Maps each rotation module choice to its class; RandomY uses RandomYRotation. |
Methods
| Member | What it is |
|---|---|
void Modify(ref Vector3 position, ref Quaternion rotation) | Runs the position module then the rotation module on the given position and rotation. |
Used in
Members of other types that take, return or hold a GeneratedPositioning: