早教吧 育儿知识 作业答案 考试题库 百科 知识分享

在线人工翻译,求翻译,我的Unity使用了个socket后就一直保这个错误,找了一天也整不清楚那里错误.错误提示:CompareBaseObjectsInternalcanonlybecalledfromthemainthread.Constructorsandfieldinitializerswill

题目详情
在线人工翻译,求翻译,我的Unity 使用了个socket后就一直保这个错误,找了一天也整不清楚那里错误.
错误提示:
CompareBaseObjectsInternal 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.
▼优质解答
答案和解析
CompareBaseObjectsInternal 只能从主线程中调用. 构造器(Constructors)和字段初始程序(field initializers)将在加载场景时从加载进程中执行.不要在构造器(Constructors)和字段初始程序(field initializers)...