protected virtual void Awake() { #if !UNITY_ANDROID || VZ_SNAPDRAGONVR TiltSteering = false; #else TiltSteering = true; #endif Distance = 0; // Neck/camera/head setup mNeck = transform.Find("Neck"); mCameraOffset = mNeck.Find("CameraOffset"); mCamera = null; Head = mNeck.Find("Head"); // Setup transition canvas mTransitionCanvas = mNeck.Find("Head/TransitionCanvas").gameObject; mTransitionCanvas.SetActive(true); mTransitionCanvasPos = mTransitionCanvas.transform.localPosition; mTransitionCanvasRot = mTransitionCanvas.transform.localRotation; mTransitionCanvasScale = mTransitionCanvas.transform.localScale; #if UNITY_ANDROID && !UNITY_EDITOR // PC/PSVR need to have text in front to be seen on external monitor // with android assume we're centered already mTransitionCanvas.transform.SetParent(mNeck, false); #endif // SteamVR IsSteamVR = (UnityEngine.XR.XRSettings.loadedDeviceName == "OpenVR" && UnityEngine.XR.XRDevice.isPresent); // Init plugin VZPlugin.Init(Application.dataPath + Path.DirectorySeparatorChar + "Plugins"); mIsInBackgroundExecution = false; #if VZ_GAME // Add OVRManager for hand controls # if UNITY_ANDROID && !UNITY_EDITOR && VZ_GEARVR
protected virtual void Awake() { Distance = 0; // Neck/camera/head setup mNeck = transform.Find("Neck"); mCameraOffset = mNeck.Find("CameraOffset"); mCamera = mCameraOffset.Find("Camera"); Head = mNeck.Find("Head"); // Setup transition canvas mTransitionCanvas = mNeck.Find("Head/TransitionCanvas").gameObject; mTransitionCanvas.SetActive(true); // SteamVR IsSteamVR = false; // SteamVR IsSteamVR = (UnityEngine.VR.VRSettings.loadedDeviceName == "OpenVR"); // Init plugin VZPlugin.Init(Application.dataPath + Path.DirectorySeparatorChar + "Plugins"); }