在首次发布游戏并为应用商店重新打包游戏之前,请在沙盒环境中测试游戏。必须执行以下操作:
This is to ensure that the UDP implementation works for a simple and nominal case. Unity recommends you test your UDP methods more extensively. After your first release, you do not need to retest in the sandbox to release new revisions of your game on UDP.
要在沙盒中测试游戏,请执行以下操作:
1.在 UDP Settings 窗口中,找到 UDP Sandbox Test Accounts 部分,然后为沙盒环境创建登录凭据。
如果已经在 UDP 控制台中添加了凭据,则可以直接使用这些凭据。
1.在 Android 设备或模拟器上运行游戏。
游戏启动时,应调用 Initialize 方法,该方法会在沙盒环境中自动显示登录屏幕。如果没有在游戏启动时调用 Initialize,请触发必要的步骤来调用 Initialize。
1.输入沙盒测试帐户的登录凭据。
这就是检查游戏是否初始化所需的全部步骤。
1.对于 IAP 游戏,进行购买以测试 IAP 购买。
在沙盒环境中不会进行任何实际交易。
每次测试成功后:
成功完成所有必需的测试后,“游戏信息”页面的左侧面板会显示一个绿色的勾号,以确认已通过沙盒测试。现在,你可以完成“游戏信息”页面上的所有剩余步骤,以发布你的第一个修订版并将其提交到商店。
沙盒登录凭据仅适用于沙盒环境的通用 UDP 构建版本。当 UDP 重新打包用于实际应用商店的构建版本时,UDP 会移除沙盒环境和登录页面,并在特定于商店的 SDK 中打补丁。构建版本中特定于商店的 SDK 可确保 IAP 交易采用该商店的付款系统。
注意:沙盒模式还支持服务器端验证。
如果出现与 IAP 相关的任何问题,请检查 UDP 和/或 IAP 实现,例如以下问题:
For further troubleshooting information, check the UDP Package documentation or contact the UDP support team via the “Contact Support” link on the UDP Console.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.