load level problem when building to ipad

I have a simple splash scene that should automatically redirect to level one ("krtek") after a few seconds. It works great on the standalone, but when i build to iPad, it just plays the splash page and then closes the program.

This is the script i have on the splash page.

function Update () {
}
yield WaitForSeconds (8.2);
Application.LoadLevel ("krtek");

Is this a common problem ? I cant see any other reference to it anywhere..

The first thing to try is to force-reboot your iPad. This has been known to clear up mysterious crash problems.

Assuming that doesn't fix it, you should run in XCode debug mode to see if you get any error messages, or even a stack trace.

Two things you can do in Unity that can cause a crash:

  • infinite recursion
  • overloading the available memory

Since it runs okay in the editor the second is more likely. Are you loading any very large assets in that scene? (Uncompressed images, for example, or large sound files?)

After clicked “build settings…” choose “player settings”,
into the inspector change the voice “call script optimization” >> Slow&Safe
:wink:

M