Problem loading Scenes, load very slow
Hello! I'm working in a 2D game and i have a problem loading scenes. When i press the button to load a scene the scene loads very slow. I tried with a scene totally empty and also loads slow.
I Hope you can help me. This is my code:
void FixedUpdate () {
//play btns
playBtn.onClick.AddListener(ShowPlay);
playPanel.onClick.AddListener(ClosePlay);
levelsBtn.onClick.AddListener(LevelsBtn);
//Store
storeBtn.onClick.AddListener(ShowStore);
storePanel.onClick.AddListener(CloseStore);
//options
optionsBtn.onClick.AddListener(ShowOptions);
optionsPanel.onClick.AddListener(CloseOptions);
}
//Play
void ShowPlay()
{
playGO.SetActive(true);
}
void ClosePlay()
{
playGO.SetActive(false);
}
void LevelsBtn()
{
SceneManager.LoadScene(2);
}
Sorry for my english :(
Answer by laszlar · Jan 28, 2018 at 08:29 PM
Huh, weird that no one replied here for a long time. If you haven't already figured it out, I'd suggest not having a different scene for game over or a title scene. Just create a canvas in your play scene, and when you click on start game, disable the canvas through script. I'm learning that I have to do that in our game.
Your answer
Follow this Question
Related Questions
Weird behavior when loading levels using triggers. 0 Answers
Making the player go from one scene to another but spawn in a certain place 0 Answers
Multiple Entrances to levels 0 Answers
Destroying a cloned gameobject when a new scene is loaded 1 Answer
Game freezes after button is clicked to switch scenes 1 Answer