mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-04 07:19:22 +00:00
[DesktopVRSwitch] Reworked SteamVR Initialization
New SteamVR initialization to avoid warnings/errors on switch.
This commit is contained in:
parent
61a45f97bc
commit
5f95755ad2
8 changed files with 39 additions and 306 deletions
|
@ -10,16 +10,16 @@ using Object = UnityEngine.Object;
|
|||
|
||||
namespace NAK.DesktopVRSwitch.Patches;
|
||||
|
||||
internal class ReferenceCameraPatch
|
||||
class ReferenceCameraPatch
|
||||
{
|
||||
internal static void OnWorldLoad()
|
||||
public static void OnWorldLoad()
|
||||
{
|
||||
Camera activeCamera = (MetaPort.Instance.isUsingVr ? PlayerSetup.Instance.vrCamera : PlayerSetup.Instance.desktopCamera).GetComponent<Camera>();
|
||||
Camera inactiveCamera = (MetaPort.Instance.isUsingVr ? PlayerSetup.Instance.desktopCamera : PlayerSetup.Instance.vrCamera).GetComponent<Camera>();
|
||||
CopyToInactiveCam(activeCamera, inactiveCamera);
|
||||
}
|
||||
|
||||
internal static void CopyToInactiveCam(Camera activeCam, Camera inactiveCam)
|
||||
static void CopyToInactiveCam(Camera activeCam, Camera inactiveCam)
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Copying active camera settings & components to inactive camera.");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue