• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Lemoln · Dec 02, 2013 at 04:30 PM · androidcrashloadingcompiling

Android level doesn't want to work after Application.LoadLevel

I made an entire game level (not very big) and made a simple menu with a "START" button. On the PC everything worked fine, but after installing it on two different devices the game crashes after a while loading the level. The menu loads fine, the button works (I made it dissapear before loading the level) but the level just wouldn't work. I created an empty level, using the same player prefab and a simple empty terrain and it loads fast and works fine! The size of my .apk is 110 mb, if it can help... Please tell me what to do!

Comment
Add comment · Show 12
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image meat5000 ♦ · Dec 02, 2013 at 04:52 PM 0
Share

Lots of people have experienced this very issue when loading a level from OnGUI.

Use OnGUI as a trigger but perform loadlevel in a separate function.

avatar image Lemoln · Dec 02, 2013 at 05:26 PM 0
Share

I'm using Raycast, not OnGUI...

avatar image meat5000 ♦ · Dec 02, 2013 at 05:27 PM 0
Share

Raycasting a plane as a button?

avatar image Lemoln · Dec 02, 2013 at 05:29 PM 0
Share

Raycasting a 3D Text, but doesn't matter, yes.

avatar image jacksmash2012 · Dec 02, 2013 at 05:34 PM 0
Share

When you run it in the editor and load the level, are there absolutely no errors in the console at all? Errors may crash the app on the device but may not be obvious in the editor (for example, a null pointer exception).

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by haim96 · Dec 02, 2013 at 06:06 PM

Hi,

i had also issues with android, every thing look fine on PC but on android thing goes wrong. to find out what is go wrong i did the following:

in your android SDK you should have file named "monitor.bat". it should be in a folder named "tools". open this monitor and run your app while your device connected to the USB in debug mode. make sure you can see your device on the device panel (upper left). if you don't pull it out and reconnect it again. if still not work make sure your android device have proper usb driver installed (check device manager).

after you got your device connected run the app and look at the bottom section. this is the run time log (also called catlog). you may find there run time errors that unity doesn't show on editor. in my case i had reference to missing prefab. not sure how the editor skipped that but he did. hope this will help you some how.... good luck!

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image haim96 · Dec 02, 2013 at 06:08 PM 0
Share

by the way, if you able to "build and run" from unity the monitor should work fine...

avatar image Lemoln · Dec 03, 2013 at 01:59 PM 0
Share

Didn't help(

avatar image haim96 · Dec 03, 2013 at 02:15 PM 0
Share

well, this is not s solution but a way to find a solution. did you look at the log? any strange red lines (error)?

i'm almost convinced that if things doesn't work only in android these should pop in run time.

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Web player build crash on new scene load. 0 Answers

Lerping the Camera closes Nexus 5, not Nexus 10 0 Answers

Crash with Android Application in Phones 1 Answer

Help with Exception: Error building Player on Android 2 Answers

Stop back key android from quitting application WHILE the scene is loading? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges