Skip to main content

StaticChunkContentManager

A class in Root.Township, Alta.Chunks.

Loads and unloads a chunk's static prefab pointers. A headless server loads the collider only pointers; clients load the normal ones.

Constructors​

MemberWhat it is
StaticChunkContentManager(Chunk chunk, bool isLogging = false)Creates a StaticChunkContentManager from chunk and isLogging.

Fields​

MemberWhat it is
static bool IsLoadingPointersStatic switch; when false, pointers are not loaded at all. Defaults to true.
static bool IsLoadingSequentiallyStatic switch; when true, pointers load one at a time instead of all together. Defaults to false.
static int PointersToLoadPerFrameStatic: how many pointer loads start before yielding a frame. Defaults to 10.
4 private and internal fields
MemberWhat it is
private bool isLoggingPrivate: set from the constructor. Not read in this build.
private static Logger loggerPrivate: logs pointer load errors.
private int pointerCountPrivate: number of pointers.
private List<string> pointersPrivate: the pointer names for this chunk, collider only on headless.

Methods​

MemberWhat it is
protected override async Task LoadInternal()Starts every pointer load, yielding a frame every PointersToLoadPerFrame, then waits for them all. Stops early if the chunk is unloading.
protected override async Task UnloadInternal()Releases this chunk's use of each pointer.
1 private and internal method
MemberWhat it is
private async Task LoadPointerAsync(string pointer)Private: uses one pointer for this chunk and waits for it to load. Errors are logged and the pointer skipped.

Used in​

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