为了账号安全,请及时绑定邮箱和手机立即绑定

基本的Oculus Leaderboards.GetEntries API使用情况引发错误

基本的Oculus Leaderboards.GetEntries API使用情况引发错误

C#
慕容3067478 2021-03-29 17:14:59
尝试对排行榜API进行简单调用失败。我什至尝试复制并粘贴文档的一些示例代码,但是它们都因相同的错误而失败。下面是我能想到的最简单的版本,它也失败了。我的Oculus开发人员设置是统一设置的。using System.Collections;using System.Collections.Generic;using UnityEngine;using Oculus.Platform;using Oculus.Platform.Models;public class leaderBoard : MonoBehaviour {    void Start () {        Leaderboards.GetEntries("POC-Score", 10, LeaderboardFilterType.None, LeaderboardStartAt.Top).OnComplete(GetEntriesCallback);    }    void GetEntriesCallback(Message<LeaderboardEntryList> msg)    {        Debug.Log("-----");        Debug.Log(msg.Data);        Debug.Log("-----");    }}我得到以下错误NullReferenceException:对象引用未设置为对象LeaderBoard.Start()的实例(在Assets / leaderBoard.cs:10处)
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 160 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信