GetComponent 的几种写法:
1、AutoRotation cmp1=(AutoRotation) GetComponent(typeof(AutoRotation));

2、AutoRotation cmp2=(AutoRotation) GetComponent("AutoRotation");

3、AutoRotation cmp3= GetComponent<AutoRotation>();

相关文章:

  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-10-16
相关资源
相似解决方案