Created
June 23, 2019 08:22
-
-
Save KzoNag/5ace0d777af6800fdd432e6b71001c90 to your computer and use it in GitHub Desktop.
OculusIntegrationのSampleFrameworkでStartSceneシーンをロードするスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
using Oculus; | |
public class StartSceneLoader : MonoBehaviour | |
{ | |
void Start() | |
{ | |
DontDestroyOnLoad(gameObject); | |
Load(); | |
} | |
void Update() | |
{ | |
if (OVRInput.Get(OVRInput.Button.One) | |
&& OVRInput.Get(OVRInput.Button.Two) | |
&& OVRInput.Get(OVRInput.Button.Three) | |
&& OVRInput.Get(OVRInput.Button.Four)) | |
{ | |
Load(); | |
} | |
} | |
private void Load() | |
{ | |
SceneManager.LoadScene("StartScene"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment