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
| Member | What it is |
|---|
PickupClamp() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private Transform castCenter | Centre of the search sphere. |
private float castRadius | Radius of the search sphere. |
private PickupEvent onPickupClamped | Event fired with the pickup that was found. |
Methods
| Member | What it is |
|---|
void Enable() | Finds the closest non-kinematic, undocked, crafted pickup in range and fires onPickupClamped with it. |
1 private and internal method
| Member | What it is |
|---|
private void OnDrawGizmosSelected() | Draws the search sphere in the editor. |