why do we use GetComponent method in unity for accessing other components from our script ,can't we just make an object of that type?

后端 未结 0 1704
暖寄归人
暖寄归人 2021-01-03 17:59

why do we have to access a component from our script using GetComponent method ? can we make its object instead?

e.g instead of

 Rigidbody rb;
 rb = Ge         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题