A class in Root.Township, Alta.Static.
Static environment instruction that places one StaticEnvironmentPiece at a position, rotation and scale.
Constructors
| Member | What it is |
|---|
SpawnInstruction() | Creates a SpawnInstruction from content, position, rotation and scale. |
SpawnInstruction(StaticEnvironmentPiece content, Vector3 position, Quaternion rotation, Vector3 scale) | Creates a SpawnInstruction from content, position, rotation and scale. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private StaticEnvironmentPiece content | The piece to spawn, loaded from contentId when needed. |
private uint contentId | Index of the piece. |
private Vector3 position | Where to spawn the piece. |
private Quaternion rotation | The piece's rotation. |
private Vector3 scale | The piece's scale. |
Methods
| Member | What it is |
|---|
override IInstructionResult Execute(object context) | Loads the piece by its index if needed and spawns it. Logs an error and returns null if the piece is missing. |
protected override void SerializeInternal(Stream stream) | Reads or writes the piece index, position, rotation and scale, and drops the cached piece. |