Skip to main content

SkillShrineTestingArea.SpawnedEntity

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

One practice object spawned in a skill shrine's testing area. Server side: it respawns the object when destroyed and, for movable ones, when it wanders too far.

Constructors​

MemberWhat it is
SpawnedEntity(PositionedNetworkPrefab positionedPrefab, SkillShrineTestingArea testingArea)Creates a SkillShrineTestingArea.SpawnedEntity from positionedPrefab and testingArea.

Fields​

3 private and internal fields
MemberWhat it is
private PositionedNetworkPrefab positionedPrefabThe prefab and its spot in the testing area.
private NetworkEntity spawnedEntityThe currently spawned object.
private SkillShrineTestingArea testingAreaThe testing area this object belongs to.

Properties​

MemberWhat it is
bool NeedToCheck { get; }Whether the prefab can move, so distance checks and resets apply.

Methods​

MemberWhat it is
void CheckDistance(Vector3 center)For movable objects, respawns it if it is further than the area's max distance from the centre (ignoring height).
void Clear()Destroys the spawned object without respawning it.
void ResetIfNeeded()Respawns movable objects. Called when the same skill orb is opened again.
2 private and internal methods
MemberWhat it is
private void DestroyAndRestart(NetworkEntity entity, bool isUnload)Respawns the object when it is destroyed, unless that was a chunk unload.
private void SpawnEntity()Spawns the prefab in the area, sets it up for the open skill and player, and marks it not to be saved.

Used in​

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