너무 어려워!!!
EditorWindow에서 Undo Redo 시에 MissingReference가 날 수가 있는데 Undo 를 이것저것해봐도 적용되지 않았다.
그래서 찾아보니 SerializedObject를 사용하면 된다는데 생각만큼 로직에 적용하기 쉽지 않았는데
겨우겨우 해보니 Undo Redo가 아주 수월하게 된다 참조 에러에는 직렬화가 최고구나;;
참고
[1] https://forum.unity.com/threads/monobehaviour-references-are-lost-on-undo.587011/
[2]chatGPT
[3] https://kingmuffin.tistory.com/95
'Unity > UnityEditor' 카테고리의 다른 글
[Unity/UnityEditor] Handles.Label Background (0) | 2024.07.16 |
---|---|
[Unity/UnityEditor] Undo (0) | 2023.09.25 |
[Unity/UnityEditor] 용어 정리 (0) | 2023.05.23 |
[Unity/UnityEditor] EditorApplication, EditorSceneManager (0) | 2023.05.17 |
[Unity/UnityEditor] UnityEditor.Selection (0) | 2023.05.10 |