void Start() { m_trackingText.text = ""; FindController(); if (m_controller != null) { m_leapConnected = m_controller.IsConnected; } if (m_startInScreenTopViewMode) { Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, false); goScreenTop(); } else if (XRSupportUtil.IsXRDevicePresent()) { Screen.SetResolution(640, 480, false); goVR(); } else { Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, false); goDesktop(); } m_deltaTime = new SmoothedFloat(); m_deltaTime.delay = 0.1f; }
void Start() { if (XRSupportUtil.IsXRDevicePresent() && XRSupportUtil.IsXREnabled() && _deviceOffsets != null) { string deviceName = XRSupportUtil.GetLoadedDeviceName(); var deviceHeightPair = _deviceOffsets.FirstOrDefault(d => deviceName.ToLower().Contains(d.DeviceName.ToLower())); if (deviceHeightPair != null) { transform.Translate(Vector3.up * deviceHeightPair.HeightOffset); } } }