gameObject.GetComponent<BoxCollider>().enabled = true;
gameObject.GetComponent<BoxCollider>().enabled = false;
과 같이 enabled 사용으로 Collider on/off 가능
'Unity' 카테고리의 다른 글
(Unity) 유니티 Scripts 라이프 사이클(생명주기,Life Cycle) (0) | 2022.12.16 |
---|---|
(Unity) Script로 오브젝트 생성하기 - CreatePrimitive (0) | 2022.12.07 |
(Unity) JSON을 통한 데이터 처리 in Unity (0) | 2022.10.24 |
(Unity) 코루틴, Couroutine (0) | 2022.10.12 |
(Unity) C# 인터페이스(interface) (0) | 2022.10.11 |