Description

The object will not be saved to the Scene. It will not be destroyed when a new Scene is loaded. It is a shortcut for HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor | HideFlags.DontUnloadUnusedAsset.

您必须使用 DestroyImmediate 从内存中手动清除该对象以避免内存泄漏。