The problem is that if I turn the camera on enabled in the editor it will show part of the scene mixed with the main menu scene. And if the loading scene main camera is enabled off I will get error Display 1 No cameras rendering.
I have two scenes in the Hierarchy. The first is Main Menu. The main menu have a camera.
Now I did that when I click on the button START A NEW GAME It will load another scene:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class NewGame : MonoBehaviour
{
public void StartNewGame(int SceneIndex)
{
SceneManager.LoadScene(SceneIndex);
}
}
In this screenshot you can see in the Inspector I'm calling the method StartNewGame and the index 1. Index 1 present the second scene that should be load: The Space Station
Now in the scene: The Space Station I have also a MainCamera under Player. The MainCamera is turned off in the editor. And I need somehow to switch between the Main Menu scene camera and the The Space Station scene camera.
If I will turn on the MainCamera in the inspector I will see some objects of the first scene and the second scene and then the game will start without the main menu and the player will fall down.
If I start the game when the MainCamera is turned off I will the Main Menu but then when I click on START A NEW GAME it will show me the message Display 1 No cameras rendering.
The last screenshot is of the Build Settings: Edit > Build Settings... I added the two scenes to the build. The first scene at index 0 is the Main Menu the second scene at index 1 is The Space Station: