[DesktopVRSwitch] Testing

This commit is contained in:
NotAKidoS 2023-06-19 19:44:23 -05:00
parent 03514305be
commit 61a45f97bc
30 changed files with 957 additions and 524 deletions

24
DesktopVRSwitch/Utils.cs Normal file
View file

@ -0,0 +1,24 @@
using ABI_RC.Core.EventSystem;
using ABI_RC.Core.Player;
using ABI_RC.Core.Savior;
using UnityEngine;
namespace NAK.DesktopVRSwitch;
internal static class Utils
{
internal static GameObject GetPlayerCameraObject(bool intoVR)
{
if (intoVR)
{
return PlayerSetup.Instance.vrCamera;
}
return PlayerSetup.Instance.desktopCamera;
}
internal static void ReloadLocalAvatar()
{
DesktopVRSwitch.Logger.Msg("Attempting to reload current local avatar from GUID.");
AssetManagement.Instance.LoadLocalAvatar(MetaPort.Instance.currentAvatarGuid);
}
}