- Home /
Scene Loading Breaking Script When Project Is Built
Ok. So i have a title screen with a very simple load scene script, it loads my second scene. This all works fine when in the editor but when i build the project it breaks my main player script. Worst part is my project was building just fine when i had just the one scene and no main menu. I don't know if including any of the scripts will help, im not using DontDestroyOnLoad(); or anything like that. and im not using any fancy id or array tech to load the scene i literally just put SceneManager.LoadScene(1);.
Answer by BRX99_GS · Aug 14, 2020 at 06:33 AM
what's the name of your scenes?? what's the script?? and don't forget to click-Add open scenes- in the build settings .
p.s: when setting the build setting of your game ensure that the scene you want to start first (within the editor ) should be the first one(index 0), you see the "start" scene in this image it will starts the first after building the game.
Answer by uni-TT · Aug 14, 2020 at 07:25 PM
Ok, so i opened up my project today to try and fix it and was metally preparing for the task ahead. But for some unknown reason it just works now! I think what happened is the player prefab i used had a whole bunch of different settings than the saved prefab or something, and all i had to do was update the prefab? Sorry to waste everybodys time like that, i was at my wits end trying to figure out what was wrong.
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
How can I stop the variable values reverting to its default values after being built? 1 Answer
Unhandled Access Violation in ntdll.dll When Building Assets For Scene. 1 Answer
U3DXT support for tvOS? 0 Answers
How to build windows 8.1 phone game in unity 3d 5.3 ? 0 Answers