Skip to main content

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.

Constructors​

MemberWhat it is
GeneratedPositioning()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

6 private and internal fields
MemberWhat it is
private GeneratedPositioning.PositionModule positionWhich position module type is picked in the inspector.
private GeneratedPositioning.Module positionModuleModule that changes the position, or null for none.
private static Dictionary<GeneratedPositioning.PositionModule, Type> positionTypesMaps each position module choice to its class (Static has none).
private GeneratedPositioning.RotationModule rotationWhich rotation module type is picked in the inspector.
private GeneratedPositioning.Module rotationModuleModule that changes the rotation, or null for none.
private static Dictionary<GeneratedPositioning.RotationModule, Type> rotationTypesMaps each rotation module choice to its class; RandomY uses RandomYRotation.

Methods​

MemberWhat 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: