Skip to main content

PositionedNetworkPrefab

A class in Root.Township, the global namespace.

A saved network prefab with its local position and rotation, for spawning dynamic content such as a skill's demo items or a shrine testing area.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private bool canMoveBacking field for CanMove.
private SerializedSavedDynamicObject savedDynamicObjectSerialized save of the prefab and its children.
private SaveMode saveModeSave mode given to the spawned entity (default ignore, so it isn't saved).

Properties​

MemberWhat it is
bool CanMove { get; }Whether the saved entity had a NetworkRigidbody.

Methods​

MemberWhat it is
override NetworkEntity Load(Transform transformParent, Chunk chunk)Spawns the saved entity under the parent at the saved position in the given chunk.
override void Save(NetworkEntity scenePrefab)Records the entity's position, whether it can move, and its saved object data.
protected override Transform GetTransform(NetworkEntity scenePrefab)Returns the entity's transform for saving the position.

Used in​

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