퍼즈 문젠가 해서 퍼즈 걸었다 풀었다 할땐 정상인데
캐릭터 마우스로 옮기고 퍼즈 풀면
비어있는 슬롯에 널대신 쓰레기값이 이빠이 들어가있노..
+ 추측인데 걍 캐릭터를 클릭하는 순간 생기는거 보니까 직렬화 관련 문제인듯?
배열이나 리스트 크기 할당은 되어있는데 내용물이 null이면 생성해서 기본값 넣는 것 같음.
+ 직렬화 널 허용 안한다네.
https://discussions.unity.com/t/can-unity-only-serialize-a-field-only-when-its-not-null/257970/2

Can Unity only serialize a field only when it's not null?
Unity’s serialization system will automatically serialize all the variables that are marked with [SerializeField], regardless of whether they are null or not. This behavior is by design, and there is no direct way to change it. However, you can create a workaround by wrapping your variable in a custom class or struct and then implementing your own custom logic for handling null values. In this case, when your variable is null, the wrapper could simply not store anything, effectively mimicking t...
discussions.unity.com
+ [SerializeField] 대신 [SerializeReference] 사용하래! 작동 확인함.
댓글 0