GetComponentsInChildren() 할 때 파라미터로 includeInactive를 true로 설정하면 비활성화된 children 배열을 가져올 수 있다.
비활성화 된 게임오브젝트의 컴포넌트를 가져오는 방법은 이 방법 밖에 없는 것으로 보인다.
- 출처 : Unity - Scripting API: Component.GetComponentsInChildren (unity3d.com)
'Engine > Unity' 카테고리의 다른 글
[Unity TIL] transform.Find("Child/ChildOfChild") 성능 (0) | 2022.03.27 |
---|---|
[TIL] MonoBehaviour.StopCoroutine() 주의사항 한 가지 (0) | 2022.03.22 |
[듀오링고 클론 코딩 with Unity] 유니티 스크립트 파일과 메타 파일 (0) | 2022.03.14 |
[듀오링고 클론 코딩 with Unity] 또다른 주석 (0) | 2022.03.03 |
[듀오링고 클론 코딩 with Unity] 주석 (comment)과 컴파일러 (0) | 2022.03.03 |