Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- #if UNITY_EDITOR
- using UnityEngine;
- #endif
- using UnityEngine.SceneManagement;
- //remember to assign the button and drag canvas into the On Click and assign the function
- public class MenuUIHandler : MonoBehaviour
- {
- public void StartNew()
- {
- SceneManager.LoadScene(1);
- }
- public void Exit()
- {
- #if UNITY_EDITOR
- UnityEditor.EditorApplication.ExitPlaymode();
- #else
- Application.Quit();
- #endif
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement