Files
2026-02-21 16:45:37 +08:00

90 lines
1.4 KiB
C#

using UnityEngine;
namespace Oculus.Platform
{
public sealed class PlatformSettings : ScriptableObject
{
[SerializeField]
private string ovrAppID = string.Empty;
[SerializeField]
private string ovrMobileAppID = string.Empty;
[SerializeField]
private bool ovrUseStandalonePlatform = true;
[SerializeField]
private bool ovrEnableARM64Support;
private static PlatformSettings instance;
public static string AppID
{
get
{
return Instance.ovrAppID;
}
set
{
Instance.ovrAppID = value;
}
}
public static string MobileAppID
{
get
{
return Instance.ovrMobileAppID;
}
set
{
Instance.ovrMobileAppID = value;
}
}
public static bool UseStandalonePlatform
{
get
{
return Instance.ovrUseStandalonePlatform;
}
set
{
Instance.ovrUseStandalonePlatform = value;
}
}
public static bool EnableARM64Support
{
get
{
return Instance.ovrEnableARM64Support;
}
set
{
Instance.ovrEnableARM64Support = value;
}
}
public static PlatformSettings Instance
{
get
{
if (instance == null)
{
instance = Resources.Load<PlatformSettings>("OculusPlatformSettings");
if (instance == null)
{
instance = ScriptableObject.CreateInstance<PlatformSettings>();
}
}
return instance;
}
set
{
instance = value;
}
}
}
}