Game works in development build, but in production I get EXC_BAC_ACCESS

I recently had some issues with getting EXC_BAC_ACCESS, which seemed to occur due to calling object/vars that didn’t exist, but that Unity didn’t detect as errors.

Then I enabled “Development build” and “Script debugging”, and I could see in Xcode what script caused the issue and could easily fix it.

Now I added a loading screen according to this tutorial:

After this my game works perfectly in “Development build”, and the loader does the job. But when I disable it, to get a production build (?), the game crashes when the loader is supposed to switch to the first level, and I get I get EXC_BAC_ACCESS.

The script uses this, where name is the name of my scene, simply “01_game”:

Application.LoadLevel(name);

Anyone has a clue on how to fix this?

Anyone? I’m willing to put a bounty or pay someone a small amount by PayPal to fix this. Thanks! :slight_smile:

What messages get written to the Xcode console?

Hi Graham, thank you for your reply. For some reason it seems to work now, I have been working a bit with the game, changing code, and don’t get this error anymore. Didn’t test it before i bumped the thread, sorry for that. I’m glad it works though. :slight_smile: