Skip to main content

PickupClamp

A class in Root.Township, the global namespace.

Component that finds the nearest loose crafted pickup within a sphere and passes it to onPickupClamped, for things like vices or clamps.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private Transform castCenterCentre of the search sphere.
private float castRadiusRadius of the search sphere.
private PickupEvent onPickupClampedEvent fired with the pickup that was found.

Methods​

MemberWhat it is
void Enable()Finds the closest non-kinematic, undocked, crafted pickup in range and fires onPickupClamped with it.
1 private and internal method
MemberWhat it is
private void OnDrawGizmosSelected()Draws the search sphere in the editor.