11-09-2017 05:37 PM
public static void Initialize(string appId = null) { appId = getAppID(appId);
if (UnityEngine.Application.isEditor && PlatformSettings.UseStandalonePlatform) { var platform = new StandalonePlatform(); IsPlatformInitialized = platform.InitializeInEditor() != null; }
private static string GetAppIDFromConfig() { if (UnityEngine.Application.platform == RuntimePlatform.Android) { return PlatformSettings.MobileAppID; } else { return PlatformSettings.AppID; } }
So, at this point, the only way to initialize the platform is to put your app id into the Rift App Id field. if (UnityEngine.Application.isEditor && PlatformSettings.UseStandalonePlatform) { var platform = new StandalonePlatform(); IsPlatformInitialized = platform.InitializeInEditor() != null; }
public Request<Models.PlatformInitialize> InitializeInEditor() {#if UNITY_ANDROID if (String.IsNullOrEmpty(PlatformSettings.MobileAppID)) { throw new UnityException("Update your App ID by selecting 'Oculus Platform' -> 'Edit Settings'"); } var appID = PlatformSettings.MobileAppID;#else if (String.IsNullOrEmpty(PlatformSettings.AppID)) { throw new UnityException("Update your App ID by selecting 'Oculus Platform' -> 'Edit Settings'"); } var appID = PlatformSettings.AppID;#endif
Bottom line is that you need to put your app id in BOTH fields, which doesn't seem right. And I still never get a callback from Entitlements.IsUserEntitledToApplication; Entitlements.IsUserEntitledToApplication().OnComplete(IsEntitledCallback);
11-09-2017 06:25 PM
// Entitlements Check
Entitlements.IsUserEntitledToApplication().OnComplete(
(message) =>
{
if (message.IsError)
{
Debug.Log("Entitlements check failed!");
}
else
{
Debug.Log("Entitlements check worked! Play On!");
}
}
);
04-26-2020 02:10 AM
05-05-2020 04:03 PM