HideFlags.DontSaveInEditor

Switch to Manual

Description

The object will not be saved to the Scene in the editor.

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