[DesktopVRSwitch] Stop being a baby.

???
This commit is contained in:
NotAKidoS 2023-06-21 14:06:12 -05:00
parent 133f5200b4
commit 6774c3ff6d
22 changed files with 205 additions and 169 deletions

View file

@ -16,15 +16,9 @@ public class PlayerSetupTracker : VRModeTracker
private void OnPostSwitch(bool intoVR)
{
PlayerSetup _playerSetup = PlayerSetup.Instance;
if (_playerSetup == null)
{
DesktopVRSwitch.Logger.Error("Error while getting PlayerSetup!");
return;
}
DesktopVRSwitch.Logger.Msg("Switching active PlayerSetup camera rigs. Updating Desktop camera FOV.");
_playerSetup.desktopCameraRig.SetActive(!intoVR);
_playerSetup.vrCameraRig.SetActive(intoVR);
PlayerSetup.Instance.desktopCameraRig.SetActive(!intoVR);
PlayerSetup.Instance.vrCameraRig.SetActive(intoVR);
}
}