NAK_CVR_Mods/DesktopVRSwitch/Utils.cs
2023-06-19 19:44:23 -05:00

24 lines
626 B
C#

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);
}
}