Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class MainMenu : MonoBehaviour
- {
- public string otherSceneName = "";
- public ArchToolkit.Settings.ArchSettings settings;
- public Loader loader;
- private AsyncOperation operation;
- public void OpenScene360()
- {
- settings.ExitCallbackOverride = this.GoBack;
- settings.movementTypePerPlatform = ArchToolkit.MovementTypePerPlatform.FullScreen360;
- this.loader.ShowLoader();
- this.operation=SceneManager.LoadSceneAsync(otherSceneName, LoadSceneMode.Single);
- this.operation.allowSceneActivation = true;
- }
- public void OpenSceneVR()
- {
- settings.ExitCallbackOverride = this.GoBack;
- settings.movementTypePerPlatform = ArchToolkit.MovementTypePerPlatform.VR;
- this.loader.ShowLoader();
- this.operation = SceneManager.LoadSceneAsync(otherSceneName, LoadSceneMode.Single);
- this.operation.allowSceneActivation = true;
- }
- private void Update()
- {
- if (this.operation != null)
- {
- this.loader.SetValue(this.operation.progress);
- }
- }
- public void GoBack()
- {
- SceneManager.LoadScene("Intro");
- }
- public void Exit()
- {
- Application.Quit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement