Unity 建议在游戏开发周期中实现 UDP,直到游戏开发周期结束(例如,当你已决定可购买的游戏应用内商品时)。这样就更容易在旧版游戏中实现 UDP,从而使这些游戏在新的应用商店中焕发出新版本的生机。
你可以通过以下方式之一在游戏中实现 UDP。
你选择的实现方式不会影响 UDP 控制台。
此实现类似于 Google Play 应用内计费 (In-App Billing) 实现。如果你之前已经为 Google Play 配置了你的游戏,则 Unity 建议使用 UDP 包。
可从 Unity Package Manager 或 Unity Asset Store 中获取 UDP 包。
For standalone UDP package installations, see Installing the UDP package.
The Unity IAP package version 2.0.0 and above does not contain the UDP DLL. This requires the UDP package version 2.0.0 and above. From these versions on, install the UDP package and install the Unity IAP package from the Asset Store.
如果你的游戏已经使用 Unity IAP,你可以继续使用 Unity IAP 包。
注意:Unity 建议将 UDP 包与 Unity IAP 包版本 2.0.0+(可从 Asset Store 中获取)搭配使用。
UDP is included in Unity IAP from version 1.22.0 - 1.23.5. If you use the Unity IAP package (1.22.0 - 1.23.5) do not install the UDP package separately. To check which Unity IAP version is installed, go to Services > Unity IAP > IAP Updates. Follow the general implementation guidance of Unity IAP’s documentation before you implement your IAP items with Unity IAP.
如果使用 Unity IAP 包,则可以使用代码或无代码实现方法在游戏中实现 IAP 商品。为了更好地与 UDP 集成,请使用代码实现 IAP。
Unity 5.6.1 或更高版本支持 UDP。Unity 建议使用 2018.4 或更高版本。
从以下包版本及更高版本开始,可将 UDP 包和 Unity IAP 包一起使用:
To access the UDP console, go to the Unity Dashboard and select Distribution Portal.
To access the UDP console from the Unity Editor, select Services > Unity Distribution Portal > Configure. In the Unity Distribution Portal settings, select 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.