[DesktopVRSwitch] - > DesktopXRSwitch

This commit is contained in:
NotAKidoS 2023-05-17 12:06:48 -05:00
parent 37fcf6ece1
commit 05374459be
21 changed files with 441 additions and 352 deletions

View file

@ -1,25 +0,0 @@
using ABI_RC.Core.Util.Object_Behaviour;
using UnityEngine;
namespace NAK.DesktopVRSwitch.Patches;
public class CameraFacingObjectTracker : MonoBehaviour
{
public CameraFacingObject cameraFacingObject;
void Start()
{
cameraFacingObject = GetComponent<CameraFacingObject>();
VRModeSwitchTracker.OnPostVRModeSwitch += PostVRModeSwitch;
}
void OnDestroy()
{
VRModeSwitchTracker.OnPostVRModeSwitch -= PostVRModeSwitch;
}
public void PostVRModeSwitch(bool enableVR, Camera activeCamera)
{
cameraFacingObject.m_Camera = activeCamera;
}
}