Skip to main content

CleaningHelper

A class in Root.Township, the global namespace.

When its target chunk finishes loading, turns on trigger colliders for one frame and pushes any loose, unheld pickup they touch by a fixed offset. Probably clears items stuck in a spot.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private Collider[] collidersTrigger colliders used for the check.
private Vector3 moveOnFoundWorld offset added to a pickup found in the triggers.
private LocationChunk targetChunkLocation chunk whose full load starts the check.

Properties​

1 private and internal property
MemberWhat it is
private int IBuildRendererBakeable.SortingOrder { get; }Bake order, always 0.

Methods​

5 private and internal methods
MemberWhat it is
private void Awake()Disables the colliders and waits for the target chunk to fully load.
private void IBuildRendererBakeable.Bake(bool isSaving)Empty build bake step.
private void IBuildRendererBakeable.Clean()Empty build clean step.
private void EnableCheck(Chunk obj)Turns the colliders on, then off again next frame.
private void OnTriggerEnter(Collider other)Moves a touched non-kinematic pickup that nobody holds by moveOnFound.