mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-04 07:19:22 +00:00
[DesktopVRSwitch] Testing
This commit is contained in:
parent
03514305be
commit
61a45f97bc
30 changed files with 957 additions and 524 deletions
27
DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs
Normal file
27
DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using ABI_RC.Core.Util.Object_Behaviour;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.DesktopVRSwitch.VRModeTrackers;
|
||||
|
||||
public class CameraFacingObjectTracker : MonoBehaviour
|
||||
{
|
||||
private CameraFacingObject _cameraFacingObject;
|
||||
|
||||
public CameraFacingObjectTracker(CameraFacingObject cameraFacingObject)
|
||||
{
|
||||
this._cameraFacingObject = cameraFacingObject;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnPreSwitch(bool intoVR) { }
|
||||
|
||||
public void OnFailedSwitch(bool intoVR) { }
|
||||
|
||||
public void OnPostSwitch(bool intoVR)
|
||||
{
|
||||
_cameraFacingObject.m_Camera = Utils.GetPlayerCameraObject(intoVR).GetComponent<Camera>();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue