Skip to main content

DistanceLODGroupManager

A class in Root.Township, the global namespace.

Client: updates every active DistanceLODGroup from the local player's position each time the player camera renders.

Constructors​

MemberWhat it is
DistanceLODGroupManager()Creates a DistanceLODGroupManager with default values.

Fields​

2 private and internal fields
MemberWhat it is
private HashSet<DistanceLODGroup> activeGroupsThe LOD groups being updated.
private Vector3 positionLocal player position from the last cull.

Methods​

MemberWhat it is
void AddGroup(DistanceLODGroup distanceLODGroup)Adds a group and updates its LOD. The first group hooks the local player's camera.
void RemoveGroup(DistanceLODGroup distanceLODGroup)Removes a group. When none are left, unhooks and removes the camera's CameraRenderEvents.
3 private and internal methods
MemberWhat it is
private void Cull()Before the camera renders, reads the local player's position and updates every group's LOD.
private void Empty()Empty after-render callback passed to CameraRenderEvents.
private void UpdatePlayer(PlayerController player)Hooks the given player's camera render events. Called when the local player is set.

Used in​

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