Skip to content

Instantly share code, notes, and snippets.

@KzoNag
Created June 23, 2019 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KzoNag/5ace0d777af6800fdd432e6b71001c90 to your computer and use it in GitHub Desktop.
Save KzoNag/5ace0d777af6800fdd432e6b71001c90 to your computer and use it in GitHub Desktop.
OculusIntegrationのSampleFrameworkでStartSceneシーンをロードするスクリプト
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