x


I can run the Unity3D Game through XCode, but can't run it directly through iPad.

I meet a strange problem today. Basically I can install and run my Unity3D in a iOS device through XCode (that generated by Unity3D iOS version). But when I tap the application directly through my iPad/iPhone, it will show the loading screen and then crash (back to the iPad/iPhone interface).

I really don't have any idea why this happend? Can some one help me??

My Unity3D version:

Unity3D Pro iOS 3.1

My iPad version:

iOS 4.2

more ▼

asked Dec 31, 2010 at 02:27 PM

KarasAya gravatar image

KarasAya
56 15 10 17

I found the problem, the loading time is far more than the iOS permission. I think when running through XCode, the iOS will not manage the app so that you can load the Game far more than 10 seconds.

Jan 01, 2011 at 02:03 AM KarasAya

This case is described in Unity Manual Troubleshooting page: http://unity3d.com/support/documentation/Manual/TroubleShooting.html#iPhoneTroubleShooting

Jan 26, 2011 at 01:41 PM Mantas Puida
(comments are locked)
10|3000 characters needed characters left

3 answers: sort oldest

I found a thread where someone else cleared up a similar problem by changing Xcode settings: http://www.iphonedevsdk.com/forum/iphone-sdk-development/30834-app-only-crashes-while-not-debugging.html

Basically he had a pointer to a deallocated object somewhere, but the Xcode setting NSZombie kept the object around in order to try and detect such problems.

If a vanilla Unity project generated such a problem it is probably a bug you want to submit to them, along with your project demonstrating the problem. But if you've gone in and edited the Objective-C code for some reason then look first at your edits; you might not be retaining an object that you need to.

Another tip is to look at the logs your app generates on the device. You should see them when you look at your iPad in the Organizer window. That may help you figure out where its crashing.

more ▼

answered Dec 31, 2010 at 02:48 PM

Bampf gravatar image

Bampf
5.6k 14 42 70

Thanks for your advice, I check the log and finally find the problem. It is the active time (loading time) of the App that exceed the iOS permitted time -- 10s. I think i have to optimize the scene for loading.

Jan 01, 2011 at 02:01 AM KarasAya

Glad you figured it out. Making the very first scene (your game menu?) smaller should help. If you have a big soundtrack file, replace it with a short loop. Change the import settings of any large textures you are using and set their maximum size to something smaller. Some textures can be compressed (probably are by default though). If you can combine lots of small textures into one large texture atlas, that can also help.

Jan 01, 2011 at 02:35 PM Bampf
(comments are locked)
10|3000 characters needed characters left

I have the same issue at times but have found that by changing the arm under the Targets and in the main Unity iPhone xcode project I'm able to get it to work. Also this post in the Unity forum might help. http://forum.unity3d.com/threads/68443-Trying-to-build-only-for-armv6-causes-a-EXC_BAD_ACCESS

more ▼

answered Dec 31, 2010 at 05:25 PM

Mani gravatar image

Mani
36 6 4 11

(comments are locked)
10|3000 characters needed characters left

The problem is this: if your App is big in size, Xcode kills your App due to the delay in loading it. Read the paragraph "Game runs fine when launched from Xcode and crashes on first level load when launched manually on the device" on this link:http://unity3d.com/support/documentation/Manual/android-troubleshooting.html

more ▼

answered Jul 13, 2011 at 03:28 PM

pepefirst gravatar image

pepefirst
20 36 29 39

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2884
x2229
x1156
x483
x421

asked: Dec 31, 2010 at 02:27 PM

Seen: 4518 times

Last Updated: Jul 13, 2011 at 03:28 PM