New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

AsyncInitialize issue

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,625 Oculus Staff
    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
    NerveGear
    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,625 Oculus Staff
    @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,625 Oculus Staff
    @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
    NerveGear
    @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: 108 Oculus Staff
    Hi,

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