Method OnDestroy OnDestroy() Called before GameObject is destroyed Declaration protected virtual void OnDestroy()