Method OnDestroy OnDestroy() Unity calls this method before the object is destroyed. Declaration protected virtual void OnDestroy()