void StartValheimVR() { HarmonyPatcher.DoPatching(); if (VHVRConfig.NonVrPlayer()) { LogDebug("Non VR Mode Patching Complete."); return; } if (VRManager.InitializeVR()) { VRManager.StartVR(); vrPlayer = new GameObject("VRPlayer"); DontDestroyOnLoad(vrPlayer); vrPlayer.AddComponent <VRPlayer>(); vrGui = new GameObject("VRGui"); DontDestroyOnLoad(vrGui); vrGui.AddComponent <VRGUI>(); if (VHVRConfig.RecenterOnStart()) { VRManager.tryRecenter(); } } else { LogError("Could not initialize VR."); enabled = false; } }
void Update() { VRManager.maybeRecenter(); #if DEBUG if (Input.GetKeyDown(KeyCode.Backslash)) { // dumpall(); } #endif }
void Update() { if (VHVRConfig.NonVrPlayer()) { return; } if (Input.GetKeyDown(VHVRConfig.GetRecenterKey())) { VRManager.tryRecenter(); } #if DEBUG if (Input.GetKeyDown(KeyCode.Backslash)) { // dumpall(); } #endif }
void StartValheimVR() { HarmonyPatcher.DoPatching(); if (VRManager.InitializeVR()) { VRManager.StartVR(); vrPlayer = new GameObject("VRPlayer"); DontDestroyOnLoad(vrPlayer); VRPlayer playerComponent = vrPlayer.AddComponent <VRPlayer>(); vrGui = new GameObject("VRGui"); DontDestroyOnLoad(vrGui); vrGui.AddComponent <VRGUI>(); } else { LogError("Could not initialize VR."); enabled = false; } }