为了账号安全,请及时绑定邮箱和手机立即绑定

unity报错:NullReferenceException: Object reference not set to an instance of an object CreatObject.Start () (at Assets/CreatObject.cs:25)

unity报错:NullReferenceException: Object reference not set to an instance of an object
CreatObject.Start () (at Assets/CreatObject.cs:25)
脚本25行:transLight.GetComponent<Light>().color = Color.green;

正在回答

3 回答

同问,我只有一个灯变了颜色,还报错

0 回复 有任何疑惑可以回复我~

程序格式没错

0 回复 有任何疑惑可以回复我~

没有获取到,具体的要看你的project,建议你看下慕课U3D脚本入门2-4.有兴趣玩U3D游戏引擎加我好友一起讨论啊,我也是最近才学习

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

unity报错:NullReferenceException: Object reference not set to an instance of an object CreatObject.Start () (at Assets/CreatObject.cs:25)

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号