mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
tweaks
This commit is contained in:
parent
23e5e9c366
commit
e62efc714e
2 changed files with 38 additions and 17 deletions
|
@ -8,6 +8,7 @@ public class VRModeSwitchTracker
|
|||
{
|
||||
public static event UnityAction<bool, Camera> OnPreVRModeSwitch;
|
||||
public static event UnityAction<bool, Camera> OnPostVRModeSwitch;
|
||||
public static event UnityAction<bool, Camera> OnFailVRModeSwitch;
|
||||
|
||||
public static void PreVRModeSwitch(bool enterVR)
|
||||
{
|
||||
|
@ -30,4 +31,15 @@ public class VRModeSwitchTracker
|
|||
},
|
||||
"Error while invoking VRModeSwitchTracker.OnPostVRModeSwitch. Did someone do a fucky?");
|
||||
}
|
||||
|
||||
public static void FailVRModeSwitch(bool enterVR)
|
||||
{
|
||||
TryCatchHell.TryCatchWrapper(() =>
|
||||
{
|
||||
DesktopVRSwitchMod.Logger.Msg("Invoking VRModeSwitchTracker.OnFailVRModeSwitch.");
|
||||
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
||||
VRModeSwitchTracker.OnFailVRModeSwitch?.Invoke(enterVR, activeCamera);
|
||||
},
|
||||
"Error while invoking OnFailVRModeSwitch.OnPreVRModeSwitch. Did someone do a fucky?");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue