- Home /
Question by
NatakuZ · Jul 15, 2016 at 09:42 AM ·
gameobjectsdestroy objectdestroyed
call a function when object when destroy
hi i search for metodh ,for call a function when a object is destoryed ,for example from another script or another object in theory i need use something like void WhenGameObjectIsDestroyed () { /// code here
}
i search on google and manual,but maybe i don't use the right keyword . Thanks.
Comment
Answer by saschandroid · Jul 15, 2016 at 10:05 AM
Perhaps this is what you want: MonoBehaviour.OnDestroy()