EnableAndUnchildIfClose
A class in Root.Township, the global namespace.
Client effect helper: when triggered near the local player, unparents and enables its object, then destroys it after a delay.
- Listed in Global namespace: E to H
- Inherits or implements
MonoBehaviour,IDontGetRigibody
Constructors
| Member | What it is |
|---|---|
EnableAndUnchildIfClose() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
Methods
| Member | What it is |
|---|---|
void Trigger() | Does nothing on a headless server or if the local player is too far; otherwise unparents, enables and schedules destruction. |