- Home /
Scene Not loading in game view
I have a main menu scene and the game scene. For my main menu scene I created a fade out whenever the scene plays. In the game scene I created a pause menu where you have the choice to go back to the Main Menu. When I clicked to go back to the Main Menu, the scene does not load in game view but it loads in scene view.
Is there anything I am doing wrong?
Scene Change Script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class PauseChange : MonoBehaviour {
// Use this for initialization
void Start () {
}
public void ChangeScene(string name)
{
SceneManager.LoadScene("MainMenu");
Debug.Log("Scene Loaded");
}
}
Answer by programer717 · Dec 16, 2017 at 03:51 AM
@DarthVader1234 if you have not built it then click the file button (top left) click build settings and add the scenes not built and click build also not saying this is another reason but you might want to put you code in the void Start (jus a suggestion don't know if this will have any affect). and if this does not work please post not working in comments and I will test it to see if it is a glitch. :)
The scenes are added in the build files. I also tried using void Start. The only thing that was showing in game view was a black screen with nothing happening.
Your answer

Follow this Question
Related Questions
SceneManager onActiveSceneChange Pause for a while before loading a new scene 0 Answers
SceneManager.LoadScene not working with button 1 Answer
How Do I Link Different Scenes? 4 Answers
Canvas gets invisble after changing scene 1 Answer
Help with error message "Overwriting the same path as another open scene is not allowed" 0 Answers