유데미 강의/C#과 Unity로 3D 게임 개발하기 : 아르곤 침공
FindWithTag()
정주찬
2022. 8. 31. 09:17
FindWithTag()
FindWithTag는 앞에 GameObject가 붙는데 Tag가 GameObject로부터 접근할 수 있으므로 GameObject가 붙는다.

그리고 이전의 코드에서 parent는 transform 타입이므로 이 게임 오브젝트 타입인 parentGameObject도 trasform에 접근해야한다.

이렇게 하면 FIndWithTag로 찾아도 잘 담기는 걸 확인할 수 있다.
