Oculus Entitlement Check Fail from Oculus Library Launch?
Our submitted App VRBowling is visible in our Oculus App library tab.
-- Unity v5.6.2f1, Oculus Utilities v1.15.0, OVRPlugin v1.14.1, SDK v1.16.0. --
Documentation
says that entitlement check will pass if User can view the app from
their library. This seems to be the case as it's visible.
However when I
launch the app from library I get Entitlement check fail. Also
Entitlement Checks pass when in stand alone build (Unity 5.6.1f1 or
5.6.2f1) as well as working in Unity Editor Play mode in both versions with User Token.
I
have attached the Oculus Entitlement Check C# file we are using based
on the Oculus / Unity Entitlement Check example code for reference here :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using Oculus;
using Oculus.Platform;
public class OculusEntitlementCheck : MonoBehaviour {
public string appID = "1078093085625410";
public GameObject extraNotice;
public GameObject warningNotice;
public GameObject enabler;
// Use this for initialization
void Start () {
Oculus.Platform.Core.AsyncInitialize(appID);
Oculus.Platform.Entitlements.IsUserEntitledToApplication().OnComplete(EntitlementCheckInit);
}
void Update(){
Oculus.Platform.Request.RunCallbacks();
}
void EntitlementCheckInit(Message msg){
if (msg.IsError){
// User is NOT entitled.
StartCoroutine(WaitForWarningShow(msg));
} else {
// User IS entitled
if(enabler!=null){
enabler.SetActive(true);
}
}
}
IEnumerator WaitForWarningShow(Message msg){
if(warningNotice!=null){
warningNotice.SetActive(true);
}
if(extraNotice!=null){
extraNotice.GetComponent<Text>().text = ""+msg;
extraNotice.SetActive(true);
}
yield return new WaitForSeconds(30);
NowQuit();
}
void NowQuit(){
UnityEngine.Application.Quit();
}
}
However as Entitlement passes everywhere else except from a library launch it seems unlikely this is the cause of our issue.
as it seems to pass in Editor and Stand alone build and is also visible
from the Oculus runtime app library, it seems unlikely that the C# code could be
the issue as Entitlement check passes everywhere else.
We have tried about 12 implementations with slight changes and variations to the above code but with no change in outcome.
The problem seems to be launching the app from in
the Oculus library when entitlement checks then seem to fail. At no
other time. Also according to documentation Oculus Entitlement check
should pass if the app is visible to the user from the library. As we
can see the app from the library, entitlement checks should pass, it
seems that the problem seems to only occur when launching the app from
the library. not sure what the issue here is?
When executing a local standalone or PIE the app loads straight away:
We have submitted a few builds with tweaks to our
environment set up and code for Entitlement Checks, but without yielding
positive results so far. Rather than continuing to submit builds I
thought it prudent to ask for support in this instance.
Has anybody any idea why this is occurring for our builds launched only from the Oculus library?
From what we have discerned if the app is visible to an Oculus user account in the library then that user will already have correct entitlement privileges, meaning entitlement check should pass from the library like it does in editor and stand alone builds.
We have contacted submissions email reporting the issue in as much detail as supplied here and are awaiting response.
-- Unity v5.6.2f1, Oculus Utilities v1.15.0, OVRPlugin v1.14.1, SDK v1.16.0. --
Documentation
says that entitlement check will pass if User can view the app from
their library. This seems to be the case as it's visible.
However when I
launch the app from library I get Entitlement check fail. Also
Entitlement Checks pass when in stand alone build (Unity 5.6.1f1 or
5.6.2f1) as well as working in Unity Editor Play mode in both versions with User Token.
I
have attached the Oculus Entitlement Check C# file we are using based
on the Oculus / Unity Entitlement Check example code for reference here :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using Oculus;
using Oculus.Platform;
public class OculusEntitlementCheck : MonoBehaviour {
public string appID = "1078093085625410";
public GameObject extraNotice;
public GameObject warningNotice;
public GameObject enabler;
// Use this for initialization
void Start () {
Oculus.Platform.Core.AsyncInitialize(appID);
Oculus.Platform.Entitlements.IsUserEntitledToApplication().OnComplete(EntitlementCheckInit);
}
void Update(){
Oculus.Platform.Request.RunCallbacks();
}
void EntitlementCheckInit(Message msg){
if (msg.IsError){
// User is NOT entitled.
StartCoroutine(WaitForWarningShow(msg));
} else {
// User IS entitled
if(enabler!=null){
enabler.SetActive(true);
}
}
}
IEnumerator WaitForWarningShow(Message msg){
if(warningNotice!=null){
warningNotice.SetActive(true);
}
if(extraNotice!=null){
extraNotice.GetComponent<Text>().text = ""+msg;
extraNotice.SetActive(true);
}
yield return new WaitForSeconds(30);
NowQuit();
}
void NowQuit(){
UnityEngine.Application.Quit();
}
}
However as Entitlement passes everywhere else except from a library launch it seems unlikely this is the cause of our issue.
There's also a screen grab of the app appearing in the library.
Howeveras it seems to pass in Editor and Stand alone build and is also visible
from the Oculus runtime app library, it seems unlikely that the C# code could be
the issue as Entitlement check passes everywhere else.
We have tried about 12 implementations with slight changes and variations to the above code but with no change in outcome.
The problem seems to be launching the app from in
the Oculus library when entitlement checks then seem to fail. At no
other time. Also according to documentation Oculus Entitlement check
should pass if the app is visible to the user from the library. As we
can see the app from the library, entitlement checks should pass, it
seems that the problem seems to only occur when launching the app from
the library. not sure what the issue here is?
When executing a local standalone or PIE the app loads straight away:
We have submitted a few builds with tweaks to our
environment set up and code for Entitlement Checks, but without yielding
positive results so far. Rather than continuing to submit builds I
thought it prudent to ask for support in this instance.
Has anybody any idea why this is occurring for our builds launched only from the Oculus library?
From what we have discerned if the app is visible to an Oculus user account in the library then that user will already have correct entitlement privileges, meaning entitlement check should pass from the library like it does in editor and stand alone builds.
We have contacted submissions email reporting the issue in as much detail as supplied here and are awaiting response.
In the meantime any insights/support/help anybody could give would be appreciated!
