using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class MainMenu : MonoBehaviour { public GameObject menu; public GameObject credits; // Start is called before the first frame update void Start() { menu.SetActive(true); credits.SetActive(false); } public void SwapCanvas() { menu.SetActive(!menu.activeSelf); credits.SetActive(!credits.activeSelf); } public void StartGame() { SceneManager.LoadScene(1); } // Update is called once per frame void Update() { } }