Im using SceneManager in one Scene and it just works fine but in my main scene it just seems to not work at all? Maybe one of you guys got something for it, Could be a stupid little that i forgot or something. Thx for the help. (This is the C# Script im using.)
using UnityEngine;
using UnityEngine.SceneManagement;
public class MainMenu : MonoBehaviour {
public void PlayGame()
{
SceneManager.LoadScene(1);
}
public void DoOptions()
{
SceneManager.LoadScene(2);
}
public void QuitGame()
{
Application.Quit();
}
}
Are you sure the scene you’re trying to load has a check mark in build settings? Are you sure of the scene numbers you’re using? (I usually reference scenes by their name instead of their number since it is easy to accidentally refer to the wrong scene by number)
Yeah i checked that multiple times its a bugg i think then.
What is the scene number you’re trying to load, and what is the scene number you’re currently running when you try to load it?
Scène 0 is the start screen , 1 to load the game , 2 to go to options.
i found out what i was apperently the raw image of the game logo was on top of the button so i didnt work
Thx for all the help tho!
Hey, did you use a Time.timeScale ? It may cause problems if you don’t change it again when you change scene. (Maybe a pause menu)
1 Like