Oculus 权利齿轮 vr

Oculus entitlement gear vr

我正在使用 Oculus Utils 1.9.0 在 Unity 5.6.1p1 中为 Gear VR 开发游戏。它现在正在开发人员控制台上进行技术审查。但是,即使将它添加到项目中,我仍然会收到 entitlement 错误。

这是他们的解释:

It appears that your app does not support entitlement checks to prevent unauthorized use of your content. Documentation on how to add entitlement checks can be found here: https://developer.oculus.com/documentation/platform/latest/concepts/pgsg-get-started-with-sdk/

这是我的授权代码:

public class PlatformManager : MonoBehaviour
{
    public static bool entitled = false;
    private static PlatformManager s_instance;
    private ulong m_myID;

    private string m_myOculusID;

    void Awake()
    {
        if(s_instance != null)
        {
            Destroy(gameObject);
            return;
        }
        s_instance = this;
        DontDestroyOnLoad(gameObject);
        Core.Initialize();
    }

    private void Start()
    {
        entitled = false;
        Entitlements.IsUserEntitledToApplication().OnComplete(IsEntitledCallback);
    }

    void IsEntitledCallback(Message msg)
    {
        if(msg.IsError)
        {
            entitled = false;
            TerminateWithError(msg);
            return;
        }
        entitled = true;
        Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback);
    }

    public static void TerminateWithError(Message msg)
    {
        Debug.Log("Error: " + msg.GetError().Message);
        UnityEngine.Application.Quit();
    }

    void GetLoggedInUserCallback(Message<User> msg)
    {
        if(msg.IsError)
        {
            TerminateWithError(msg);
            return;
        }

        m_myID = msg.Data.ID;
        m_myOculusID = msg.Data.OculusID;
    }
}

授权后我没有用 ID 做任何事情。我应该做点什么吗?我的代码有错误吗?授权后我确实得到了真正的价值。

我的应用程序已通过权利检查和技术审查。代码很好,但我不得不添加一条消息让用户知道他没有权限,然后退出应用程序。