Oculus Connect 4 will feature more than 30 sessions across four tracks: Develop, Design, Distribute, and Future.

We kick things off with a keynote address on October 11!
New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

AsyncInitialize issue

JMStudioJMStudio Posts: 3
Virtual Boy (or Girl)
Hi there,
I'm currently working on setting entitlements in app and found some issue with async operation, espacially AsyncInitialize.
It is kinda stuck and not processing, I had to use normal Initialize instead. In code below, the callback OnComplete in Async is never calling. Any suggestions?
Oculus.Platform.Core.AsyncInitialize().OnComplete((Oculus.Platform.Message<Oculus.Platform.Models.PlatformInitialize> platformData) => {
    Oculus.Platform.Entitlements.IsUserEntitledToApplication().OnComplete((Oculus.Platform.Message msg) => {
        m_Initialized = true;
        if (!msg.IsError) // Entitlement check passed
        {
            m_EntitlementPassed = true;
        }
        else // Entitlement check failed
        {
            m_EntitlementPassed = false;
        }
    });
});


Comments

  • imperativityimperativity Posts: 1,321
    Hi,

    Welcome to the Oculus Developer Forums.

    What version of platform SDK are you using?

    Have you followed the documentation on setting up entitlement checks here?

  • JMStudioJMStudio Posts: 3
    Virtual Boy (or Girl)
    Platform SDK version is 1.17, comes with Unity utilities v 1.15
    Yes I have, I pattern it on documentation, but it is missing Async OnComplete code. My solution should work, there is no mistake within high level code.
  • imperativityimperativity Posts: 1,321
    @JMStudio

    Thanks for providing this additional info. I am looking into this further and will update this thread when I have additional information to share.
  • imperativityimperativity Posts: 1,321
    @JMStudio

    Quick question on this: AsyncInitialize takes an app ID, or the app ID needs to be in the app's config. Did you manage to catch exceptions to see if the initial callsite threw an exception?
  • JMStudioJMStudio Posts: 3
    Virtual Boy (or Girl)
    @imperativity
    Quick question, late answer, sorry I had some work. AppID is stored in OculusPlatformSettings,asset, it is loading correctly. Seems like it requires running instance of Oculus application when playing inside Unity Editor.
  • juanoldinhojuanoldinho Posts: 105 Oculus Staff
    Hi,

    Yes, Oculus Home needs to be running even when using the Unity Editor.
Sign In or Register to comment.