# GameObject::OnDestroy 销毁回调。 ```cpp void OnDestroy(); ``` 在对象被销毁前调用,用于清理资源。 ## 相关文档 - [GameObject 总览](game-object.md) - [Destroy](destroy.md)