Next: , Previous: , Up: General   [Contents][Index]


8.3 Destroy With Me

Component: DestroyWithMe

A simple way to make sure that when this object dies, other things go with it. Great for players that have a camera attached to the prefab wherein the camera is detatched on start (See component DetatchOnStart).

Important - Must be populated

Field of DestroyWithMe: GameObject[] targets

List of things to destroy when I destroy

Important - Must be populated

Field of DestroyWithMe: GameObject[] targets

List of things to destroy when I destroy