Unity 建议在游戏开发周期中实现 UDP,直到游戏开发周期结束(例如,当你已决定可购买的游戏应用内商品时)。这样就更容易在旧版游戏中实现 UDP,从而使这些游戏在新的应用商店中焕发出新版本的生机。
你可以通过以下方式之一在游戏中实现 UDP。
你选择的实现方式不会影响 UDP 控制台。
此实现类似于 Google Play 应用内计费 (In-App Billing) 实现。如果你之前已经为 Google Play 配置了你的游戏,则 Unity 建议使用 UDP 包。
可从 Unity Package Manager 或 Unity Asset Store 中获取 UDP 包。
如需安装独立的 UDP 包,请参阅安装 UDP 包。
Unity IAP 包 2.0.0 及更高版本不包含 UDP DLL。这种情况下需要 UDP 包 2.0.0 及更高版本。从这些版本开始,请从 Asset Store 安装 UDP 包并安装 Unity IAP 包。
如果你的游戏已经使用 Unity IAP,你可以继续使用 Unity IAP 包。
注意:Unity 建议将 UDP 包与 Unity IAP 包版本 2.0.0+(可从 Asset Store 中获取)搭配使用。
UDP 包含在 1.22.0 - 1.23.5 版本的 Unity IAP 中。如果你使用 Unity IAP 包 (1.22.0 - 1.23.5),不要再另外安装 UDP 包。 要检查安装了哪个 Unity IAP 版本,请选择 Window > Unity IAP > IAP Updates。 在使用 Unity IAP 实现 IAP 商品之前,请遵循 Unity IAP 文档中的常规实现指南。
如果使用 Unity IAP 包,则可以使用代码或无代码实现方法在游戏中实现 IAP 商品。为了更好地与 UDP 集成,请使用代码实现 IAP。
Unity 5.6.1 或更高版本支持 UDP。Unity 建议使用 2018.4 或更高版本。
从以下包版本及更高版本开始,可将 UDP 包和 Unity IAP 包一起使用:
访问 UDP 控制台:https://distribute.dashboard.unity.com。
要从 Unity 编辑器访问 UDP 控制台,选择 Window > Unity Distribution Portal > Settings。在 UDP Settings Inspector 窗口中,选择 Go to 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.