void OnDestroy()

Summary

Called once, when the component or gameobject is destroyed
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.