에디터 모드에서는 DestroyImmediate를 사용해야 함
참고
https://docs.unity3d.com/ScriptReference/Object.DestroyImmediate.html
Unity - Scripting API: Object.DestroyImmediate
This function should only be used when writing editor code since the delayed destruction will never be invoked in edit mode. In game code you should use Object.Destroy instead. Destroy is always delayed (but executed within the same frame). Use this functi
docs.unity3d.com
'Unity > UnityEditor' 카테고리의 다른 글
[Unity/UnityEditor] Undo Redo MissingReference (0) | 2023.07.28 |
---|---|
[Unity/UnityEditor] 용어 정리 (0) | 2023.05.23 |
[Unity/UnityEditor] EditorApplication, EditorSceneManager (0) | 2023.05.17 |
[Unity/UnityEditor] UnityEditor.Selection (0) | 2023.05.10 |
[Unity/UnityEditor] EditorApplication.isPlaying (0) | 2023.05.10 |