你的下一项功能
用户反馈
直接从游戏中收集反馈。
Unity

可见的结果
游戏中的测试消息出现在仪表盘中。
查看用户反馈1:57
此教程以英语播放。
单独打开视频 ↗准备同一个项目
在仪表盘中选择与游戏配置相同的项目。
用户反馈 →首次请求不需要额外定义。没有对应游戏数据时,空结果也有效。
实现此功能
你可以预览指南。运行需要有效的项目密钥。 准备项目
已安装 SDK、导入项目配置,且玩家已登录。
保存C#文件并挂到GameObject,进入Play后检查Console。
C#
1using UnityEngine;
2using PM.horizOn.Cloud.Core;
3using PM.horizOn.Cloud.Manager;
4
5// 将此脚本挂到第一个场景中的某个 GameObject 上。
6public class UserFeedbackDemo : MonoBehaviour
7{
8 async void Start()
9 {
10 // 准备:初始化、连接并登录玩家。
11 HorizonApp.Initialize();
12 await new HorizonServer().Connect();
13 if (!UserManager.Instance.IsSignedIn)
14 {
15 bool authenticated = UserManager.Instance.HasCachedAnonymousToken()
16 ? await UserManager.Instance.RestoreAnonymousSession()
17 : await UserManager.Instance.SignUpAnonymous("StatisticsPlayer");
18 if (!authenticated) return;
19 }
20
21 // horizOn:发送错误报告或功能请求。
22 // Bug report with auto device info
23 await FeedbackManager.Instance.ReportBug(
24 title: "Crash on level 5",
25 message: "Game crashes when opening inventory"
26 );
27
28 // Feature request
29 await FeedbackManager.Instance.RequestFeature(
30 title: "Dark mode",
31 message: "Please add dark mode option"
32 );
33 }
34}
测试你的新功能。
游戏中的测试消息出现在仪表盘中。
在仪表盘中选择与游戏配置相同的项目。


