An abstract class in Root.Township, the global namespace.
Serializable base for a saved prefab reference with a local position and rotation, which subclasses spawn back under a parent in a chunk.
Constructors
| Member | What it is |
|---|
protected PositionedPrefab() | Creates a PositionedPrefab with default values. |
Fields
| Member | What it is |
|---|
protected Vector3 position | Saved local position. |
protected Quaternion rotation | Saved local rotation. |
Methods
| Member | What it is |
|---|
abstract T Load(Transform transformParent, Chunk chunk) | Spawns the prefab under a parent in a chunk. |
virtual void Save(T scenePrefab) | Stores the instance's local position and rotation. |
protected abstract Transform GetTransform(T scenePrefab) | Returns the transform of a spawned instance. |