- Home /
unity is saying the build settings has not been added even though it has. help??
The error is: Scene with build index: "Scene with build index: 1 couldn't be loaded because it has not been added to the build settings. To add a scene to the build settings use the menu File->Build Settings... UnityEngine.Application:LoadLevel(Int32) menuscriptcchh:StartLevel() (at Assets/Standard Assets/ParticleSystems/Scripts/menuscriptcchh.cs:36) UnityEngine.EventSystems.EventSystem:Update() "
I have already added it to the build settings and I clicked build. Does anyone know why it isnt working???
Answer by Gamestroyer · Oct 26, 2020 at 08:01 AM
You don't have a scene with build index 1, I think you meant to load scene: 0 because you only have that scene.
Answer by Kofiro · Oct 26, 2020 at 08:04 AM
Kindly check line 36 of your menuscriptcchh.cs script. The error seems to be from there.
If you can send a screenshot of that line, that would be helpful as well.
it isnt letting me send it seperately. so ive copied it and the script and the line with the asterisks on either side of it is line 36.
using UnityEngine; using UnityEngine.UI; using System.Collections;
public class menuscriptcchh : $$anonymous$$onoBehaviour {
public Canvas quit$$anonymous$$enu;
public Button startText;
public Button exitText;
// Use this for initialization
void Start()
{
quit$$anonymous$$enu = quit$$anonymous$$enu.GetComponent<Canvas>();
startText = startText.GetComponent<Button>();
exitText = exitText.GetComponent<Button>();
quit$$anonymous$$enu.enabled = false;
}
// Update is called once per frame
public void ExitPress()
{
quit$$anonymous$$enu.enabled = true;
startText.enabled = false;
exitText.enabled = false;
}
public void NoPress()
{
quit$$anonymous$$enu.enabled = false;
startText.enabled = true;
exitText.enabled = true;
}
public void StartLevel()
{
**Application.LoadLevel(1);**
}
public void ExitGame()
{
Application.Quit();
}
}.
Answer by marflaounas · Oct 26, 2020 at 08:07 AM
@Gamestroyer ohh okay thank makes sense. does this mean that my scenes aren't added to the build yet. I have been told that I have to drag the scenes that I want in the game from the project window into "scenes and build", but it only lets me drag the "vetgame" one. Is there something else that I have to do in the Build Settings that will allow me to press the buttons for the game, if so, can you tell me how to do it.
If you have other scenes and you are not able to drag them in the build setting, try to close unity and reopen it. Unity sometimes glitches.
i tried that but when i drag the "vetgame" from the project manager to the Build Settings, it still says it is 0
Your answer
Follow this Question
Related Questions
Small game hangs on start, skipping unity splash screen. 0 Answers
Loading new missions for RPG from SQL Database 1 Answer
CSharp Pre-Loader, how get Load status? 1 Answer
Help with Exception: Error building Player on Android 2 Answers
Loading Scree 2 Answers