Hello guys. My first post:)
I’ve been having some problems with I guess asset loading?
I am seeing some wierd hickups when I test my game on iPhone 4.
On iPhone 5, iPad Mini, iPhone 5S it runs smooth.
I have unity pro so I’ve tested the game in the profiler and turns out its mostly due to overhead by Loading.UpdatePreloading → Application.Integrate Assets in Background
Here are the screenshots from the profiler on iPhone4 :
Hickup 1:
Hickup 2:
I might not fully grasp whats going on but I was sure that if I load everything up at the beginning then there will no longer be any more loading? Why does unity keep doing stuff in the background when I’ve already loaded everything up? (If you look at the screenshots the 2 hickups are cause by UpdatePreloading but actually update preloading is present in every frame!)
The way I have my scenes set up is this:
I have a loading scene where I basically create all the object pools , create physics stuff, load prefabs and so on and when its done I load the Game scene.
Here is the code for loading my scene. It’s on my persistent object that stays between the two scenes and creates all the controllers.
void Update ()
{
if(allDone)
return;
if(!externalLoadingStarted)
{
loadExternals();
externalLoadingStarted = true;
return;
}
if(!internalLoadingStarted)
{
loadInternals();
internalLoadingStarted = true;
return;
}
if(internalFinished && externalFinished)
{
if(!textShown)
{
infoText.text = "TAP TO CONTINUE";
infoText.characterSize = 0.07f;
textShown = true;
}
if(!mainSceneLoaded && fakeTrigger)
{
mainSceneLoaded = true;
Debug.Log ("loading game!");
Application.LoadLevel(1);
Debug.Log ("loading finished?");
allDone = true;
}
}
if(Input.GetMouseButtonDown(0))
fakeTrigger = true;
updateTextEffect();
}

