Oculus权利装备vr

问题描述 投票:1回答:1

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

这是他们的解释:

您的应用似乎不支持授权检查,以防止未经授权使用您的内容。有关如何添加权利检查的文档,请访问: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。我应该做点什么吗?我的代码中有错误吗?我有权获得真正的价值。

unity3d virtual-reality oculus gear-vr
1个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.