Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums will be revoked at the discretion of Oculus staff.
New to the forums? Click here to read the How To guide. -- Developers click here.

Entitlement check doesn't work

FULLEYE.NETFULLEYE.NET Posts: 2
NerveGear
edited June 2018 in Mobile Development
Hi, I'm trying to publish my app for Gear VR, build in Unity and I have issues with entitlement check. It works well in editor but doesn't in build. This is the code used to test entitlement:
using System;
using System.Collections;
using System.Collections.Generic;
using Oculus.Platform;
using UnityEngine;

public class AppEntitlementCheck : MonoBehaviour {


    public GameObject sphere;
    public GameObject cube;
    public GameObject cube_2;

    void Awake() {
        cube_2.SetActive(true);
        try
        {
            Core.AsyncInitialize("1944699388876497");
            Entitlements.IsUserEntitledToApplication().OnComplete(GetEntitlementCallback);

        }
        catch (UnityException e)
        {
            sphere.SetActive(true);
            Debug.LogError("Platform failed to initialize due to exception");
            Debug.LogException(e);
            UnityEngine.Application.Quit();
        }
    }


    void GetEntitlementCallback(Message msg)
    {
        if (msg.IsError)
        {
            Debug.LogError("You are NOT entitled to use this app.");
            UnityEngine.Application.Quit();
            sphere.SetActive(true);
        }
        else
        {
            Debug.Log("Enjoy :)");
            cube.SetActive(true);
        }
    }    

}
*random objects are there just to test it on Gear VR*

It's look like Unity just ignores all commands that uses Oculus Platform, because the first object shows...

Thanks for your Tips,

Sam 



Comments

  • NinjaGaijinNinjaGaijin Posts: 100 Oculus Staff
    @FULLEYE.NET

    Welcome to the Oculus Developer Forum!

    I'll reach out to our internal engineering team for insight. Once they respond, I'll update you here.
    If you need immediate help or want additional support/context on an issue you are having with our software or integration:

    1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
    2. Please submit a ticket here (include what you've gathered in step 1).
    3. Tag me @NinjaGaijin once you have done so!
  • FULLEYE.NETFULLEYE.NET Posts: 2
    NerveGear
    @NinjaGaijin

    Thank you for your answer, I hope they will figure out it soon.

    Sam
  • ravindersaxenaravindersaxena Posts: 1
    NerveGear
    We are facing the exact same issue. Our app has been submitted 2 times. We have tested internally through Alpha and Beta channels but no luck so far and no quick response from the Oculus team. It seems to be a known issue and for no reason they are going to hold the game to be released on the store.
Sign In or Register to comment.