Skip to main content

FakePlayerHelper

A class in Root.Township, the global namespace.

Editor debug helper on a Player: chunks dropped into its lists in the Inspector during play get the player added to or removed from their player lists.

Constructors​

MemberWhat it is
FakePlayerHelper()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private List<Chunk> loadChunksChunks to add this player to on the next Inspector change. Cleared after use.
private List<Chunk> unloadChunksChunks to remove this player from on the next Inspector change. Cleared after use.

Methods​

1 private and internal method
MemberWhat it is
private void OnValidate()In play mode, adds the player to each loadChunks chunk and removes it from each unloadChunks chunk, then clears both lists.