Skip to main content

OverworldChunk

A class in Root.Township, Alta.Chunks.

A LocationChunk in the overworld grid, with an X and Z grid index. Loads the chunks around it by radius as well as its normal neighbours.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private int gridXIndexBacking field for GridXIndex.
private int gridZIndexBacking field for GridZIndex.

Properties​

MemberWhat it is
int GridXIndex { get; }X index of this chunk in the overworld grid.
int GridZIndex { get; }Z index of this chunk in the overworld grid.

Methods​

MemberWhat it is
static string CreateChunkIdentifier(int xIndex, int yIndex)Builds the identifier string for a grid cell, in the form Chunk x-y.
override void GetNeighboursForLoading(float remainingLoadBudget, HashSet<Chunk> result)Adds the base neighbours, then all overworld chunks within the remaining load budget radius.
void SetGridPosition(int xIndex, int zIndex)Sets the X and Z grid indexes.
protected override void OnValidate()Just calls the base OnValidate.

Used in​

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