I'm attempting to use Application.LoadLevelAsync() to load a level and it's causing Unity to crash about 50% of the time. I'm running the load level operation as a coroutine while running a progress bar type object as another coroutine. The level loading operation generates information that updates the progress bar. Has anyone else had a similar experience with Unity crashing when using LoadLevelAsync()?
Did you PushAssetDependencies() in your build script and forget to load dependent assets?
I had this when a colleague changed the way some scripts worked. He made an object that existed in the scene into a prefab and then used a script to instantiate it. However we had a different script that attempted to GameObject.Find it. On iPhone, the scripts seemed to run in a different order and we only saw this during a LevelLoadAsync. And of course, GameObject.Find returns null if it does not find an object. And you’ll get a nasty NullExeceptionError.
With Unity 3.4 you can fix this by setting the Script Execution Order (Edit->Project Settings->Script Execution Order). And make the script that instantiates object run before ones that use the instantiated object.