mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
broken
This commit is contained in:
parent
26441f8b1e
commit
c7b16abd4f
27 changed files with 591 additions and 91 deletions
|
@ -89,45 +89,45 @@ public class DesktopVRSwitcher : MonoBehaviour
|
|||
yield break;
|
||||
}
|
||||
|
||||
//one frame after switch attempt
|
||||
public void FailedVRModeSwitch(bool isVR)
|
||||
{
|
||||
if (_softVRSwitch) return;
|
||||
//let tracked objects know a switch failed
|
||||
VRModeSwitchTracker.FailVRModeSwitch(isVR);
|
||||
}
|
||||
|
||||
//one frame before switch attempt
|
||||
public void PreVRModeSwitch(bool isVR)
|
||||
public void PreVRModeSwitch(bool enableVR)
|
||||
{
|
||||
if (_softVRSwitch) return;
|
||||
//let tracked objects know we are attempting to switch
|
||||
VRModeSwitchTracker.PreVRModeSwitch(isVR);
|
||||
VRModeSwitchTracker.PreVRModeSwitch(enableVR);
|
||||
}
|
||||
|
||||
//one frame after switch attempt
|
||||
public void PostVRModeSwitch(bool isVR)
|
||||
public void FailedVRModeSwitch(bool enableVR)
|
||||
{
|
||||
if (_softVRSwitch) return;
|
||||
//let tracked objects know a switch failed
|
||||
VRModeSwitchTracker.FailVRModeSwitch(enableVR);
|
||||
}
|
||||
|
||||
//one frame after switch attempt
|
||||
public void PostVRModeSwitch(bool enableVR)
|
||||
{
|
||||
if (_softVRSwitch) return;
|
||||
//close the menus
|
||||
TryCatchHell.CloseCohtmlMenus();
|
||||
|
||||
//the base of VR checks
|
||||
TryCatchHell.SetCheckVR(isVR);
|
||||
TryCatchHell.SetMetaPort(isVR);
|
||||
TryCatchHell.SetCheckVR(enableVR);
|
||||
TryCatchHell.SetMetaPort(enableVR);
|
||||
|
||||
//game basics for functional gameplay post switch
|
||||
TryCatchHell.RepositionCohtmlHud(isVR);
|
||||
TryCatchHell.UpdateHudOperations(isVR);
|
||||
TryCatchHell.RepositionCohtmlHud(enableVR);
|
||||
TryCatchHell.UpdateHudOperations(enableVR);
|
||||
TryCatchHell.DisableMirrorCanvas();
|
||||
TryCatchHell.SwitchActiveCameraRigs(isVR);
|
||||
TryCatchHell.SwitchActiveCameraRigs(enableVR);
|
||||
TryCatchHell.ResetCVRInputManager();
|
||||
TryCatchHell.UpdateRichPresence();
|
||||
TryCatchHell.UpdateGestureReconizerCam();
|
||||
TryCatchHell.UpdateMenuCoreData(isVR);
|
||||
TryCatchHell.UpdateMenuCoreData(enableVR);
|
||||
|
||||
//let tracked objects know we switched
|
||||
VRModeSwitchTracker.PostVRModeSwitch(isVR);
|
||||
VRModeSwitchTracker.PostVRModeSwitch(enableVR);
|
||||
|
||||
//reload avatar by default, optional for debugging
|
||||
if (_reloadLocalAvatar)
|
||||
|
|
|
@ -18,11 +18,11 @@ namespace NAK.DesktopVRSwitch;
|
|||
public class DesktopVRSwitch : MelonMod
|
||||
{
|
||||
internal static MelonLogger.Instance Logger;
|
||||
|
||||
public static readonly MelonPreferences_Category Category =
|
||||
|
||||
public static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(DesktopVRSwitch));
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryEnterCalibrationOnSwitch =
|
||||
public static readonly MelonPreferences_Entry<bool> EntryEnterCalibrationOnSwitch =
|
||||
Category.CreateEntry("Enter Calibration on Switch", true, description: "Should you automatically be placed into calibration after switch if FBT is available? Overridden by Save Calibration IK setting.");
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
|
|
|
@ -20,7 +20,7 @@ public class CVRPickupObjectTracker : MonoBehaviour
|
|||
VRModeSwitchTracker.OnPostVRModeSwitch -= PostVRModeSwitch;
|
||||
}
|
||||
|
||||
public void PostVRModeSwitch(bool isVR, Camera activeCamera)
|
||||
public void PostVRModeSwitch(bool enableVR, Camera activeCamera)
|
||||
{
|
||||
if (pickupObject != null)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace NAK.DesktopVRSwitch.Patches;
|
|||
public class CameraFacingObjectTracker : MonoBehaviour
|
||||
{
|
||||
public CameraFacingObject cameraFacingObject;
|
||||
|
||||
void Start()
|
||||
{
|
||||
cameraFacingObject = GetComponent<CameraFacingObject>();
|
||||
|
@ -17,7 +18,7 @@ public class CameraFacingObjectTracker : MonoBehaviour
|
|||
VRModeSwitchTracker.OnPostVRModeSwitch -= PostVRModeSwitch;
|
||||
}
|
||||
|
||||
public void PostVRModeSwitch(bool isVR, Camera activeCamera)
|
||||
public void PostVRModeSwitch(bool enableVR, Camera activeCamera)
|
||||
{
|
||||
cameraFacingObject.m_Camera = activeCamera;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using ABI_RC.Systems.IK;
|
||||
using ABI_RC.Systems.IK.SubSystems;
|
||||
using ABI_RC.Systems.IK.TrackingModules;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.DesktopVRSwitch.Patches;
|
||||
|
@ -9,53 +8,80 @@ namespace NAK.DesktopVRSwitch.Patches;
|
|||
public class IKSystemTracker : MonoBehaviour
|
||||
{
|
||||
public IKSystem ikSystem;
|
||||
public Traverse _traverseModules;
|
||||
|
||||
void Start()
|
||||
{
|
||||
ikSystem = GetComponent<IKSystem>();
|
||||
_traverseModules = Traverse.Create(ikSystem).Field("_trackingModules");
|
||||
VRModeSwitchTracker.OnPreVRModeSwitch += PreVRModeSwitch;
|
||||
VRModeSwitchTracker.OnFailVRModeSwitch += FailedVRModeSwitch;
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch += PostVRModeSwitch;
|
||||
}
|
||||
void OnDestroy()
|
||||
{
|
||||
VRModeSwitchTracker.OnPreVRModeSwitch -= PreVRModeSwitch;
|
||||
VRModeSwitchTracker.OnFailVRModeSwitch -= FailedVRModeSwitch;
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch -= PostVRModeSwitch;
|
||||
}
|
||||
|
||||
public void PostVRModeSwitch(bool isVR, Camera activeCamera)
|
||||
public void PreVRModeSwitch(bool enableVR, Camera activeCamera)
|
||||
{
|
||||
var _trackingModules = _traverseModules.GetValue<List<TrackingModule>>();
|
||||
SteamVRTrackingModule openVRTrackingModule = _trackingModules.FirstOrDefault(m => m is SteamVRTrackingModule) as SteamVRTrackingModule;
|
||||
if (openVRTrackingModule != null)
|
||||
{
|
||||
if (isVR)
|
||||
{
|
||||
openVRTrackingModule.ModuleStart();
|
||||
}
|
||||
else
|
||||
{
|
||||
//why named destroy when it doesnt ?
|
||||
openVRTrackingModule.ModuleDestroy();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var steamVRTrackingModule = CreateSteamVRTrackingModule();
|
||||
ikSystem.AddTrackingModule(steamVRTrackingModule);
|
||||
}
|
||||
BodySystem.TrackingEnabled = false;
|
||||
BodySystem.TrackingPositionWeight = 0f;
|
||||
BodySystem.TrackingLocomotionEnabled = false;
|
||||
if (IKSystem.vrik != null)
|
||||
IKSystem.vrik.enabled = false;
|
||||
}
|
||||
|
||||
public void FailedVRModeSwitch(bool enableVR, Camera activeCamera)
|
||||
{
|
||||
BodySystem.TrackingEnabled = true;
|
||||
BodySystem.TrackingPositionWeight = 1f;
|
||||
BodySystem.TrackingLocomotionEnabled = true;
|
||||
if (IKSystem.vrik != null)
|
||||
IKSystem.vrik.enabled = true;
|
||||
}
|
||||
|
||||
public void PostVRModeSwitch(bool enableVR, Camera activeCamera)
|
||||
{
|
||||
if (IKSystem.vrik != null)
|
||||
DestroyImmediate(IKSystem.vrik);
|
||||
|
||||
//make sure you are fully tracking
|
||||
BodySystem.TrackingEnabled = true;
|
||||
BodySystem.TrackingPositionWeight = 1f;
|
||||
BodySystem.TrackingLocomotionEnabled = true;
|
||||
BodySystem.isCalibratedAsFullBody = false;
|
||||
BodySystem.isCalibrating = false;
|
||||
BodySystem.isRecalibration = false;
|
||||
//make it so you dont instantly end up in FBT from Desktop
|
||||
IKSystem.firstAvatarLoaded = DesktopVRSwitch.EntryEnterCalibrationOnSwitch.Value;
|
||||
//turn of finger tracking just in case user switched controllers
|
||||
ikSystem.FingerSystem.controlActive = false;
|
||||
|
||||
//vrik should be deleted by avatar switch
|
||||
|
||||
SetupSteamVRTrackingModule(enableVR);
|
||||
}
|
||||
|
||||
//thanks for marking the constructor as internal
|
||||
private SteamVRTrackingModule CreateSteamVRTrackingModule()
|
||||
void SetupSteamVRTrackingModule(bool enableVR)
|
||||
{
|
||||
var steamVRTrackingModuleType = typeof(SteamVRTrackingModule);
|
||||
var constructor = steamVRTrackingModuleType.GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, null);
|
||||
var instance = constructor.Invoke(null);
|
||||
return (SteamVRTrackingModule)instance;
|
||||
var openVRModule = ikSystem._trackingModules.OfType<SteamVRTrackingModule>().FirstOrDefault();
|
||||
|
||||
if (openVRModule != null)
|
||||
{
|
||||
if (enableVR)
|
||||
{
|
||||
openVRModule.ModuleStart();
|
||||
}
|
||||
else
|
||||
{
|
||||
openVRModule.ModuleDestroy();
|
||||
}
|
||||
}
|
||||
else if (enableVR)
|
||||
{
|
||||
var newVRModule = new SteamVRTrackingModule();
|
||||
ikSystem.AddTrackingModule(newVRModule);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,17 +12,17 @@ public class MovementSystemTracker : MonoBehaviour
|
|||
void Start()
|
||||
{
|
||||
movementSystem = GetComponent<MovementSystem>();
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch += PreVRModeSwitch;
|
||||
VRModeSwitchTracker.OnPreVRModeSwitch += PreVRModeSwitch;
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch += PostVRModeSwitch;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch -= PreVRModeSwitch;
|
||||
VRModeSwitchTracker.OnPreVRModeSwitch -= PreVRModeSwitch;
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch -= PostVRModeSwitch;
|
||||
}
|
||||
|
||||
public void PreVRModeSwitch(bool isVR, Camera activeCamera)
|
||||
public void PreVRModeSwitch(bool enableVR, Camera activeCamera)
|
||||
{
|
||||
//correct rotationPivot y position, so we dont teleport up/down
|
||||
Vector3 position = movementSystem.rotationPivot.transform.position;
|
||||
|
@ -34,15 +34,21 @@ public class MovementSystemTracker : MonoBehaviour
|
|||
|
||||
//I correct for this in lazy way, but i use rotationPivot instead of avatar root,
|
||||
//so the user can still switch even if avatar is null (if it failed to load for example).
|
||||
|
||||
movementSystem.ChangeCrouch(false);
|
||||
movementSystem.ChangeProne(false);
|
||||
}
|
||||
|
||||
public void PostVRModeSwitch(bool isVR, Camera activeCamera)
|
||||
public void PostVRModeSwitch(bool enableVR, Camera activeCamera)
|
||||
{
|
||||
//immediatly update camera to new camera transform
|
||||
movementSystem.rotationPivot = activeCamera.transform;
|
||||
//lazy way of correcting Desktop & VR offset issue (game does the maths)
|
||||
movementSystem.TeleportToPosRot(preSwitchWorldPosition, preSwitchWorldRotation, false);
|
||||
//recenter desktop collision to player object
|
||||
if (!isVR) movementSystem.UpdateColliderCenter(movementSystem.transform.position);
|
||||
if (!enableVR) movementSystem.UpdateColliderCenter(movementSystem.transform.position);
|
||||
|
||||
movementSystem.ChangeCrouch(false);
|
||||
movementSystem.ChangeProne(false);
|
||||
}
|
||||
}
|
|
@ -10,35 +10,35 @@ public class VRModeSwitchTracker
|
|||
public static event UnityAction<bool, Camera> OnPostVRModeSwitch;
|
||||
public static event UnityAction<bool, Camera> OnFailVRModeSwitch;
|
||||
|
||||
public static void PreVRModeSwitch(bool isVR)
|
||||
public static void PreVRModeSwitch(bool enableVR)
|
||||
{
|
||||
TryCatchHell.TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Invoking VRModeSwitchTracker.OnPreVRModeSwitch.");
|
||||
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
||||
VRModeSwitchTracker.OnPreVRModeSwitch?.Invoke(isVR, activeCamera);
|
||||
VRModeSwitchTracker.OnPreVRModeSwitch?.Invoke(enableVR, activeCamera);
|
||||
},
|
||||
"Error while invoking VRModeSwitchTracker.OnPreVRModeSwitch. Did someone do a fucky?");
|
||||
}
|
||||
|
||||
public static void PostVRModeSwitch(bool isVR)
|
||||
public static void PostVRModeSwitch(bool enableVR)
|
||||
{
|
||||
TryCatchHell.TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Invoking VRModeSwitchTracker.OnPostVRModeSwitch.");
|
||||
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch?.Invoke(isVR, activeCamera);
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch?.Invoke(enableVR, activeCamera);
|
||||
},
|
||||
"Error while invoking VRModeSwitchTracker.OnPostVRModeSwitch. Did someone do a fucky?");
|
||||
}
|
||||
|
||||
public static void FailVRModeSwitch(bool isVR)
|
||||
public static void FailVRModeSwitch(bool enableVR)
|
||||
{
|
||||
TryCatchHell.TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Invoking VRModeSwitchTracker.OnFailVRModeSwitch.");
|
||||
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
||||
VRModeSwitchTracker.OnFailVRModeSwitch?.Invoke(isVR, activeCamera);
|
||||
VRModeSwitchTracker.OnFailVRModeSwitch?.Invoke(enableVR, activeCamera);
|
||||
},
|
||||
"Error while invoking OnFailVRModeSwitch.OnPreVRModeSwitch. Did someone do a fucky?");
|
||||
}
|
||||
|
|
|
@ -7,14 +7,10 @@ namespace NAK.DesktopVRSwitch.Patches;
|
|||
public class VRTrackerManagerTracker : MonoBehaviour
|
||||
{
|
||||
public VRTrackerManager vrTrackerManager;
|
||||
public Traverse _hasCheckedForKnucklesTraverse;
|
||||
public Traverse _posesTraverse;
|
||||
|
||||
void Start()
|
||||
{
|
||||
vrTrackerManager = GetComponent<VRTrackerManager>();
|
||||
_posesTraverse = Traverse.Create(vrTrackerManager).Field("poses");
|
||||
_hasCheckedForKnucklesTraverse = Traverse.Create(vrTrackerManager).Field("hasCheckedForKnuckles");
|
||||
VRModeSwitchTracker.OnPostVRModeSwitch += PostVRModeSwitch;
|
||||
}
|
||||
void OnDestroy()
|
||||
|
@ -22,14 +18,14 @@ public class VRTrackerManagerTracker : MonoBehaviour
|
|||
VRModeSwitchTracker.OnPostVRModeSwitch -= PostVRModeSwitch;
|
||||
}
|
||||
|
||||
public void PostVRModeSwitch(bool isVR, Camera activeCamera)
|
||||
public void PostVRModeSwitch(bool enableVR, Camera activeCamera)
|
||||
{
|
||||
//force the VRTrackerManager to reset anything its stored
|
||||
//this makes it get correct Left/Right hand if entering VR with different controllers
|
||||
//or if you restarted SteamVR and controllers are now in swapped index
|
||||
vrTrackerManager.poses = null;
|
||||
vrTrackerManager.leftHand = null;
|
||||
vrTrackerManager.rightHand = null;
|
||||
_posesTraverse.SetValue(null);
|
||||
_hasCheckedForKnucklesTraverse.SetValue(false);
|
||||
vrTrackerManager.hasCheckedForKnuckles = false;
|
||||
}
|
||||
}
|
|
@ -26,6 +26,6 @@ using System.Reflection;
|
|||
namespace NAK.DesktopVRSwitch.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "4.3.5";
|
||||
public const string Version = "4.3.6";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
|
@ -5,7 +5,6 @@ using ABI_RC.Core.Player;
|
|||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Core.UI;
|
||||
using ABI_RC.Systems.Camera;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.DesktopVRSwitch;
|
||||
|
@ -36,45 +35,45 @@ internal class TryCatchHell
|
|||
"Setting CheckVR hasVrDeviceLoaded failed.");
|
||||
}
|
||||
|
||||
internal static void SetCheckVR(bool isVR)
|
||||
internal static void SetCheckVR(bool enableVR)
|
||||
{
|
||||
TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg($"Setting CheckVR hasVrDeviceLoaded to {isVR}.");
|
||||
CheckVR.Instance.hasVrDeviceLoaded = isVR;
|
||||
DesktopVRSwitch.Logger.Msg($"Setting CheckVR hasVrDeviceLoaded to {enableVR}.");
|
||||
CheckVR.Instance.hasVrDeviceLoaded = enableVR;
|
||||
},
|
||||
"Setting CheckVR hasVrDeviceLoaded failed.");
|
||||
}
|
||||
|
||||
internal static void SetMetaPort(bool isVR)
|
||||
internal static void SetMetaPort(bool enableVR)
|
||||
{
|
||||
TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg($"Setting MetaPort isUsingVr to {isVR}.");
|
||||
MetaPort.Instance.isUsingVr = isVR;
|
||||
DesktopVRSwitch.Logger.Msg($"Setting MetaPort isUsingVr to {enableVR}.");
|
||||
MetaPort.Instance.isUsingVr = enableVR;
|
||||
},
|
||||
"Setting MetaPort isUsingVr failed.");
|
||||
}
|
||||
|
||||
internal static void RepositionCohtmlHud(bool isVR)
|
||||
internal static void RepositionCohtmlHud(bool enableVR)
|
||||
{
|
||||
TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Configuring new hud affinity for CohtmlHud.");
|
||||
CohtmlHud.Instance.gameObject.transform.parent = isVR ? PlayerSetup.Instance.vrCamera.transform : PlayerSetup.Instance.desktopCamera.transform;
|
||||
CohtmlHud.Instance.gameObject.transform.parent = enableVR ? PlayerSetup.Instance.vrCamera.transform : PlayerSetup.Instance.desktopCamera.transform;
|
||||
CVRTools.ConfigureHudAffinity();
|
||||
CohtmlHud.Instance.gameObject.transform.localScale = new Vector3(1.2f, 1f, 1.2f);
|
||||
},
|
||||
"Error parenting CohtmlHud to active camera.");
|
||||
}
|
||||
|
||||
internal static void UpdateHudOperations(bool isVR)
|
||||
internal static void UpdateHudOperations(bool enableVR)
|
||||
{
|
||||
TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Switching HudOperations worldLoadingItem & worldLoadStatus.");
|
||||
HudOperations.Instance.worldLoadingItem = isVR ? HudOperations.Instance.worldLoadingItemVr : HudOperations.Instance.worldLoadingItemDesktop;
|
||||
HudOperations.Instance.worldLoadStatus = isVR ? HudOperations.Instance.worldLoadStatusVr : HudOperations.Instance.worldLoadStatusDesktop;
|
||||
HudOperations.Instance.worldLoadingItem = enableVR ? HudOperations.Instance.worldLoadingItemVr : HudOperations.Instance.worldLoadingItemDesktop;
|
||||
HudOperations.Instance.worldLoadStatus = enableVR ? HudOperations.Instance.worldLoadStatusVr : HudOperations.Instance.worldLoadStatusDesktop;
|
||||
},
|
||||
"Failed switching HudOperations objects.");
|
||||
}
|
||||
|
@ -91,13 +90,13 @@ internal class TryCatchHell
|
|||
"Failed to disable PortableCamera canvas mirroring.");
|
||||
}
|
||||
|
||||
internal static void SwitchActiveCameraRigs(bool isVR)
|
||||
internal static void SwitchActiveCameraRigs(bool enableVR)
|
||||
{
|
||||
TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Switching active PlayerSetup camera rigs. Updating Desktop camera FOV.");
|
||||
PlayerSetup.Instance.desktopCameraRig.SetActive(!isVR);
|
||||
PlayerSetup.Instance.vrCameraRig.SetActive(isVR);
|
||||
PlayerSetup.Instance.desktopCameraRig.SetActive(!enableVR);
|
||||
PlayerSetup.Instance.vrCameraRig.SetActive(enableVR);
|
||||
CVR_DesktopCameraController.UpdateFov();
|
||||
//uicamera has script that copies fov from desktop cam
|
||||
//toggling the cameras on/off resets aspect ratio
|
||||
|
@ -172,17 +171,17 @@ internal class TryCatchHell
|
|||
TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Updating CVRGestureRecognizer _camera to active camera.");
|
||||
Traverse.Create(CVRGestureRecognizer.Instance).Field("_camera").SetValue(PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>());
|
||||
CVRGestureRecognizer.Instance._camera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
||||
},
|
||||
"Failed to update CVRGestureRecognizer camera.");
|
||||
}
|
||||
|
||||
internal static void UpdateMenuCoreData(bool isVR)
|
||||
internal static void UpdateMenuCoreData(bool enableVR)
|
||||
{
|
||||
TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Updating CVR_Menu_Data core data.");
|
||||
CVR_MenuManager.Instance.coreData.core.inVr = isVR;
|
||||
CVR_MenuManager.Instance.coreData.core.inVr = enableVR;
|
||||
},
|
||||
"Failed to update CVR_Menu_Data core data.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue