unity中用GameObject.Find("物体名称").GetComponent<脚本名>.成员怎么调用不了还会报错
Findcanonlybecalledfromthemainthread.Constructorsandfieldinitializerswillbeexecutedfr...
Find can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function. 展开
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function. 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |