void Start() { gvr = FindObjectOfType <GvrEditorEmulator>(); gvrPointer = FindObjectOfType <GvrPointerPhysicsRaycaster>(); //gvr.gameObject.SetActive(false); //gvrPointer.enabled = false; transform.LookAt(lookAtObjects[0]); }
private GameManager gameManager; //the gameManager(controlling the state) /** * Initializes the controller, and necessary variables for the movement */ void Start() { controller = GetComponent <CharacterController>(); gvrEditor = transform.GetChild(0).GetComponent <GvrEditorEmulator>(); vrHead = Camera.main.transform; isInAir = false; moveForwardInAir = false; gameManager = GameObject.FindWithTag("GameManager").GetComponent <GameManager>(); }
public void Recenter() { #if !UNITY_EDITOR GvrCardboardHelpers.Recenter(); #else GvrEditorEmulator emulator = FindObjectOfType <GvrEditorEmulator>(); if (emulator == null) { return; } emulator.Recenter(); #endif // !UNITY_EDITOR }
private void Awake() { if (Instance == null) { instance = this; } else if (Instance != this) { Debug.LogError("More than one active GvrEditorEmulator instance was found in your " + "scene. Ensure that there is only one active GvrEditorEmulator."); this.enabled = false; return; } }
void Start() { cc = GetComponent <CharacterController> (); gvrEditor = transform.GetChild(0).GetComponent <GvrEditorEmulator> (); vrHead = Camera.main.transform; }