1、AutoRotation cmp1=(AutoRotation) GetComponent(typeof(AutoRotation)); 2、AutoRotation cmp2=(AutoRotation) GetComponent("AutoRotation"); 3、AutoRotation cmp3= GetComponent<AutoRotation>();
unity3d GetComponent
最新推荐文章于 2024-06-12 23:13:30 发布
1、AutoRotation cmp1=(AutoRotation) GetComponent(typeof(AutoRotation)); 2、AutoRotation cmp2=(AutoRotation) GetComponent("AutoRotation"); 3、AutoRotation cmp3= GetComponent<AutoRotation>();