Skip to main content

PositionedStaticPrefab

A class in Root.Township, the global namespace.

A saved plain prefab with a local position and rotation, spawned under a parent transform when a chunk loads it.

Constructors​

MemberWhat it is
PositionedStaticPrefab()Creates a PositionedStaticPrefab with default values.

Fields​

1 private and internal field
MemberWhat it is
private GameObject prefabPrefab to instantiate on load.

Methods​

MemberWhat it is
override GameObject Load(Transform transformParent, Chunk chunk)Instantiates the prefab under the given parent at the saved local position and rotation.
override void Save(GameObject scenePrefab)Stores the scene object's local position and rotation (same as the base class).
protected override Transform GetTransform(GameObject scenePrefab)Returns the scene object's transform, used by Save to read its local position and rotation.

Used in​

Members of other types that take, return or hold a PositionedStaticPrefab: