I'm using Unity 4.6, Xcode 6. I get the following exception at iOS splash screen:> 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.>> (Filename:> /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineObject.cpp> Line: 17)>> Unhandled Exception:> System.ArgumentException:> 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. (Filename:> /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp> Line: 49)
I tried to debug deeper then I found the exception starts from method UnityLoadApplication() in UnityAppController.mm. In that method Unity seems to execute some async tasks but i don't know what is it. I appreciate anyone helps me resolve this problem. Thanks!
↧