A class in Root.Township, Alta.Populations.
Population member that leaves its population once it moves outside its chunk's buffer bounds, then gets chunked normally and stops being saved.
Constructors
| Member | What it is |
|---|
BoundsPopulationItem() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|
static readonly UpdateModule distanceCheckUpdateModule | Budgeted update module shared by all items of this type for the distance check. |
4 private and internal fields
| Member | What it is |
|---|
private Bounds chunkBounds | The buffer bounds of the population's chunk, set in Initialize. |
private ChunkDetector detector | The entity's chunk detector, off while this item is tracked. |
private bool isInitialized | True after Initialize; the check does nothing before. |
private IUnityUpdateMethod update | Handle for the registered distance check. |
Methods
| Member | What it is |
|---|
override void Initialize() | Server: marks the item ready and stores its chunk's buffer bounds. |
3 private and internal methods
| Member | What it is |
|---|
private void CheckInsideBounds() | If the item is outside the chunk bounds, removes it from the population, moves it to the best chunk for its position and sets its save mode to Ignore. |
private void OnDisable() | Stops the check, turns the chunk detector back on and recalculates the entity's chunk. |
private void OnEnable() | Turns off the entity's ChunkDetector and registers the distance check with a budgeted update. |