[DesktopVRSwitch] Minor changes

This commit is contained in:
NotAKidoS 2023-08-03 00:05:45 -05:00
parent 6d17085f21
commit 4c09f9bd57
25 changed files with 359 additions and 205 deletions

View file

@ -14,11 +14,11 @@ public class PlayerSetupTracker : VRModeTracker
VRModeSwitchManager.OnPostVRModeSwitch -= OnPostSwitch;
}
private void OnPostSwitch(bool intoVR)
private void OnPostSwitch(object sender, VRModeSwitchManager.VRModeEventArgs args)
{
DesktopVRSwitch.Logger.Msg("Switching active PlayerSetup camera rigs. Updating Desktop camera FOV.");
PlayerSetup.Instance.desktopCameraRig.SetActive(!intoVR);
PlayerSetup.Instance.vrCameraRig.SetActive(intoVR);
PlayerSetup.Instance.desktopCameraRig.SetActive(!args.IsUsingVr);
PlayerSetup.Instance.vrCameraRig.SetActive(args.IsUsingVr);
}
}