Unity

[Unity] GetComponent 문법

오즈마스터 2019. 9. 9. 12:41
GameObject.GetComponent<Rigidbody2D>() 
// 아래의 축약형태 
(Rigidbody2D)GameObject.GetComponent(typeof(Rigidbody2D)