Hello there!
I’m making a game but the next level is not loading.
I added it to the build settings and this is my code.
void Update()
{
cakeAmount.text = "Cakes: " + CAKES + "/" + (GameObject.FindGameObjectsWithTag("Cake").Length + CAKES);
if (cAMA >= 1)
{
if (CAKES == cAMA)
{
if (NextLevelWhat != 69)
{
Application.LoadLevel("SampleScene" + NextLevelWhat);
} else
{
Application.LoadLevel("WIN");
}
}
}
}
It loads in the editor but not when the game is build in the executable. There also are no errors.
BEFORE YOU ASK: yes i also tried SceneManager.LoadScene