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
1
Question by semiessessi · Mar 17, 2014 at 11:42 AM · iosscenexcodeloadinglevels

Why do i get error that level is not in build settings when i can see that it is in multiple ways?

Specifically I get the error message:

Level '' (1) couldn't be loaded because it has not been added to the build settings. To add a level to the build settings use the menu File->Build Settings...

This appears in the debug output in Xcode /only/ for the iOS build of our game. Every other platform build does not have this problem and successfully loads the level. I can see the text data in ProjectSettings.asset is correct and the 'Build settings' UI also has a level number 1 which is the correct level.

Aside from the error not occurring on other platforms the content of the scene in question are loaded and used correctly on these platforms.

I have cleaned out the library and temporary files to the best of my ability... does anyone have any suggestions as to what I might have configured wrongly to achieve this? There is no indication of a problem during the build process - only when running on a device.

Annoyingly - as an aside - the builds work okay in other respects, minus the functonality included in that scene, except on the original iPad mini which hard crashes about the time I expect to see this error in a debug build.

This smells of a bug - at the least because everything works correctly on all other platforms I can test on. The contents of ProjectSettings.asset should be respected regardless as to any temporary data, caches or bad defaults...

EDIT: I have now tested this on a clean machine and am able to reproduce the problem. I am raising a bug for this - in the meantime I will try using the string form of the function as workaround.

EDIT: I have now tried the string version of the function and instead I get this 'complimentary' error message - but it also works correctly on all other platforms:

Level 'bg_music_additive' (-1) couldn't be loaded because it has not been added to the build settings. To add a level to the build settings use the menu File->Build Settings...

EDIT: A crucial omission in the original question is that I am using LoadLevelAdditiveAsync. It turns out that LoadLevelAdditive works fine - if not asynchronously.

EDIT: Bug raised - Case 597310. I have suggested a simple mitigation of making the error message accurate - something like: "LoadLevelAdditiveAsync does not work correctly for iOS - use LoadLevelAdditive instead" so this becomes trivial to identify and workaround until a real fix is provided (if ever).

EDIT: Another bug is that LoadLevelAdditive only works under iOS with the indices and not the scene name (which works under Android, Windows Desktop, Mac OS X)

Comment
Add comment · Show 4
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 Owen-Reynolds · Mar 17, 2014 at 04:44 PM 0
Share

Are there any funny #ifdef IPHONE directives? Could be something there is knocking things loose. You're currently using LoadLevel(int)? I want to say LoadLevel(string) could have been trying to load level "space-1" somehow.

avatar image semiessessi · Mar 17, 2014 at 04:51 PM 0
Share

There are no #if directives in that area of the code... regardless this is really a data problem and not a code problem. I am quite thoroughly convinced that this is a genuine bug and am searching for any kind of workaround now... next up I am planning to remove the 'Async' only for iOS and live with the hitch.

avatar image Owen-Reynolds · Mar 17, 2014 at 08:10 PM 0
Share

Is it only for level 1? Do levels 2 and 3 also fail?

Does it fail on a dummy project, 3 stub levels and one 20-line script with a button to load each? Huge pain. But ideally, that $$anonymous$$imal test succeeds, and you "only" have something corrupt, but fixable.

avatar image semiessessi · Mar 18, 2014 at 09:40 AM 0
Share

I've wasted enough time on this already and I'm in a bit of a crunch. There is sufficient evidence that this is a bug... I might revisit this if the devs are too busy/lazy to do their job in the meantime.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by BAIZOR · Feb 02, 2016 at 05:31 PM

I had similar problem. My solution is to check EditorBuildSettings.asset and fix mistakes in it. Some times unity put wrong characters.

For example my scene has name "Church". Unity changed the name in the file to "\u0421hurch", then can't find scene with name "Church", because it isn't exists.

Comment
Add comment · Show 1 · 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 shadowpuppet · Aug 21, 2016 at 01:47 AM 0
Share

how do you "check" EditorBuildSettings.asset? I keep getting an error saying a scene isn't in my build settings when it clearly is

avatar image
0

Answer by Max_Bol · Sep 26, 2017 at 11:51 AM

I just faced this issues and the way I used to fix the problem is to clear the Build Settings' scenes and add them back in.

There seems to be an issue where moving the scenes files in a different newly created folder might not be updated in the Build Setting internal paths. In my case, I had to reorganize the folder containing the project's scenes as it was becoming a real mess. After, I started getting error from the Build Index where, for example, it tells me that Build Index (1) is missing and I have to add it into the Build Setting (while I had over 30 scenes in the build setting)

Removing (select & delete) then add it back fixed the issue.

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

25 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Having 10 Levels in 1 Scene? 1 Answer

New scene for minigame or not? 1 Answer

Unity alters my launch images 1 Answer

iOS build is including Mac OSX .bundle files into Xcode Project 2 Answers

iOS Xcode Error: Thread 1: EXC_BREAKPOINT 0 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