Forum Discussion
Anonymous
6 years agoOculus SDK didn't callback for standalone
Hi,
I am following the oculus unity standalone example code for entitlement check but it didn't callback. (Update: it works with a build but not in UnityEditor. The following issue only exists with UnityEditor)
Thanks,
Ke
I am following the oculus unity standalone example code for entitlement check but it didn't callback. (Update: it works with a build but not in UnityEditor. The following issue only exists with UnityEditor)
tryI added Debug.Log in Callback.HandleMessage(Message msg) in Oculus sdk and found the request id in Message was mismatched with the request id which was used to register the callback method by always 1 less. For example, if the request id for registry was 38, then the id in message for callback was 37.
{
Core.Initialize();
Debug.Log($"Oculus initialised {Oculus.Platform.Core.IsInitialized()}");
Request request = Entitlements.IsUserEntitledToApplication();
Debug.Log($"request id {request.RequestID}");
request.OnComplete((Message msg) =>
{
Debug.Log("Entitlement check finished");
if (msg.IsError)
{
// User is NOT entitled.
Debug.Log(msg.GetError().Message);
onFailed();
}
else
{
}
}
);
OVRPlugin.occlusionMesh = true;
}
catch (Exception ex)
{
Debug.Log("failed to init oculus", ex);
}
internal static void OnComplete<T>(Request<T> request, Message<T>.Callback callback)
{
requestIDsToCallbacks[request.RequestID] = new RequestCallback<T>(callback);
}
if (requestIDsToCallbacks.TryGetValue(msg.RequestID, out callbackHolder))Any idea what's wrong?
{
....
}
Thanks,
Ke
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 years agoAnonymous
- 3 months ago