Unity 3.0 error in xcode after starting run on ipod touch 2nd gen

I am a newbie and following the 'Getting Started with Unity' tutorial. I have created and textured a terrain and then skipped ahead and created the first person controller. Game runs fine in Unity and I can move around,

When I build & run on my ipod I get the unity logo on my touch and then xcode, in the code below the last line 'UnityInitApplication(appPath);' returns EXC_BAD_ACCESS and breaks in the ide. Hovering over (appPath) in the ide shows a path in there.

Smells like a project setup or something error'd out issue. What might be causing this?

  • (void) startUnity:(UIApplication*)application {

    if ENABLE_INTERNAL_PROFILER

    GC_notify_event = (void*)gccallback;

    endif

    char const* appPath = [[[NSBundle mainBundle] bundlePath]UTF8String]; UnityInitApplication(appPath);

There shouldn't be anything wrong with that line if you haven't modified anything.

  • You cannot use Unity's terrain engine on iOS. That might break your game. I've never tried it to see what happens though.

  • You said you're new so I doubt this possibility, but have you used any custom plugins.

  • Dynamic typing will give you errors too.

To your first bullet, I have created and textured a terrain.

iOS doesn't do terrain...??

Yes, you cant use terrian from unity, the alternative way is you may create a low poly terrain from maya and you can access it in iphone.

i have already done like this in my project.