유니티를 사용하다가 분명 시작전엔 정상적으로 Component에 들어있는 GameObject가 실행만하면 빠져서
"MissingComponentException: There is no 'GameObject' attached to the "Gamemanager" game object, but a script is trying to access it."
오류가 뜨는 경우가 있다. 그럴떄는
object = GetComponent<GameObject>();
같이 컴포넌트를 할당해주는 코드를 빼면 된다.
'코딩 > UNITY' 카테고리의 다른 글
유니티 플랫포머 개발중 y값 이동에 문제가 생기는 버그 해결법 (0) | 2021.06.14 |
---|---|
{unity 코딩} unity rigidbody constraints 코드 제어방법 (0) | 2019.11.24 |
{unity 코드 설명} JUST SHOOT playercontroller (0) | 2019.11.20 |
[unity 게임] JUST SHOOT (0) | 2019.11.16 |