2023/07 4

[Unity/UnityEditor] Undo Redo MissingReference

너무 어려워!!!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[4] https://m.blog.naver.com/PostView.nhn?blogId=hammerimpact&logNo=..

Unity/UnityEditor 2023.07.28

[Python] module 사용 종합 버전(json, os, dict, shutil, string)

import json import os.path import shutil '''json''' # 읽기 with open('경로', "r") as file: json_data = json.load(file) # 쓰기 with open('경로', "w") as file: json.dump(json_data, file, indent="\t") # indent = "\t" : 들여쓰기 포함 '''os''' # 디렉토리 생성 os.makedirs('경로') # 경로 존재 확인 if os.path.exists('경로'): print("있다") # 해당 경로에 있는거 열기 os.startfile('경로') # 절대 경로 찾기 os.path.abspath('경로') # 파일 제거 os.remove('경로') # 경로의..

Python 2023.07.27