Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 hicks · Jun 25, 2013 at 01:31 AM · androiderrorloadlevelno

Android: Application.LoadLevel("level_name") does not do anything

I have a game with multiple scenes. Everything worked fine, in the Editor and on different Android devices. Then I changed some graphics today in one level, added a new texture to an object. Everything was fine in the Editor, then I wanted to finally see the result on the device, but I couldn't load the scene. I have one scene starting the game, showing a custom "splash screen" (since I don't have Android Pro). That scene automatically loads the second scene, the main menu. In that scene I select the level to load. (Btw that scene contained the new textures as a preview of the level I added the graphics to.) When I selected a level (doesn't matter which one, the one with the new textures or any other) the game freezes. I am loading the new scene with

 Debug.Log("loading " + sceneToLoad);
 Application.LoadLevel(sceneToLoad);
 Debug.Log("loaded " + sceneToLoad);

The scene is definitely listed in the build settings. Both debug messages get called. But from then on everything just stops. Neither Update() from that script gets called nor anything in the new scene. The frame just freezes after that call. No other debug messages than mine get written to logcat. No error message from Unity. The time scale is 1, "Split Application Binary" is not checked. I even deleted the new textures, and the scene I added them to. I changed the scene order to load the main menu first. That worked, and I was able to load a level. But when I tried to load the splash screen scene, it froze again, without any error message from Unity. Then I tried to move the level to the "Resources" folder, which had absolutely no effect. Now I changed the scene order back, so that the splash screen scene is loaded first. Now the game even crashes right after the Unity logo with

 06-24 18:39:42.343: W/Unity(24147): The referenced script on this Behaviour is missing!
 06-24 18:39:42.343: E/Unity(24147): A script behaviour has a different serialization layout when loading. (Read 24 bytes but expected 32 bytes)
 06-24 18:39:42.343: E/Unity(24147): Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

But no, I don't use preprocessor directives for properties. I also don't get the message that something is corrupt. I tried a development build, normal build, no difference. My APK is about 35MB big. I'm really desperate right now, because I don't have time for issues like that. That project is my bachelor thesis.. No matter what I try, I always get a similar result.

I just tried to change the package name and revert my project to the state that worked yesterday. It even worked! Then I made the changes with the new graphics and I got exactly the same issue. Unity won't load any level after the main menu. Does anyone have an idea? Sounds like a Unity bug when the engine stops doing anything without any output..

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by hicks · Jun 26, 2013 at 12:17 PM

Ok, seems like I solved it somehow. I reverted my project to the last working state (without the new graphics) and renamed the Android package. It worked again on my device. Then I repeated all my changes manually (adding the new graphics, changing materials and prefabs). But that cannot be the correct solution. Once published, you cannot change the package name anymore! I just hope this never happens again..

Comment
Add comment · 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
0

Answer by tungchengvn · Feb 25, 2016 at 08:38 AM

i have the same problem. After check the log in Debug build mode , I found that there are some warning with the shader: one shader for DX11 but my android device doesn't support.

 'Hidden/CameraMotionBlurDX11' - Pass '' has no vertex shader02-25 14:53:04.901 28616-28658/com.deercat.infiniteflight D/Unity: WARNING: Shader 
 02-25 14:53:04.901 28616-28658/com.deercat.infiniteflight D/Unity: Unsupported: 'Hidden/CameraMotionBlurDX11' - Setting to default shader.

After remove that "CameraMotionBlurDX11" shader, my scene is load perfectly.

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

16 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

Related Questions

Android Button Text 1 Answer

Build error 2 Answers

Android game crash startup 0 Answers

load level on collision 2 Answers

How do I get the MainCamera to trigger application.loadLevel when it hits a collider? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges