OnDestroy
This event is called when the object is destroyed by either a script call or at the end of the page.
Implicit arguments
Object@ self
Handle to the associated object.
Sample
event MyEvent.OnDestroy { // Print object's name to the console Print(self.name); }