protected override void Awake() { base.Awake(); data = new PointerEventData(eventSystem); if (canvas != null) { if (VrHelper.VRIsPresent()) { canvas.worldCamera = camera; } } }
private void Start() { print(VrHelper.VRIsPresent()); // mode = (VrHelper.VRIsPresent()) ? Mode.VR : Mode.PC; DontDestroyOnLoad(gameObject); for (int i = 0; i < lightColors.Length; i++) { switch (i) { case 0: lightColors[i] = Color.red; pinLight.color = Color.red; break; case 1: lightColors[i] = Color.white; break; case 2: lightColors[i] = Color.yellow; break; case 3: lightColors[i] = Color.blue; break; case 4: lightColors[i] = Color.cyan; break; case 5: lightColors[i] = Color.magenta; break; } } SaveBallData(); SavePinData(); }