UnityException: Internal_CreateGameObject 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.冷知识5:出于性能考量,在不采用development build模式打包时,Unity不会报上述错误,但会因多线程问题造成程序随机崩溃或未知错误!
因此,Unity建议不要在脚本中使用多线程,除非……
冷知识6:要安全的使用多线程,并享受其带来的性能优势,可以使用Unity的Job System