Unity3D/Trouble Shooting

CompareBaseObjectsInternal can only be called from the main thread.

blueasa 2014. 11. 6. 18:10

실행할 때, 문제는 없는 데 유니티(에디터)를 종료할 때 아래와 같은 에러메시지를 확인..


CompareBaseObjectsInternal can only be called from the main thread.

Constructors and field initializers will be executed from the loading thread when loading a scene.

Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.


어디가 문젠지 헤메다가 알게 된 건

MonoBehaviour를 상속받아 쓰는데도 생성자/소멸자를 사용한 부분이 있었다.
이 번 문제는 종료할 때 나면서 소멸자쪽의 문제였던 것 같은데..
아무튼 생성자/소멸자를 Awake/OnDestroy 등으로 모두 교체했다.

그리고 아래는 같은 에러 관련 참조할만한 포스팅..



반응형