设置项目启用 Unity 服务之后,即可启用 Unity IAP 服务。
在 Services 窗口中,选择 In-App Purchasing。
单击 Enable 按钮以启用 IAP。
以下错误消息可能表示在 Unity Cloud Services 窗口中已禁用 Unity IAP,或者 Unity 已经与互联网断开连接:
要解决这些错误,请首先尝试重新加载 Services 窗口。执行此操作的快捷方法是将其关闭后重新打开。重新加载后,请确保已启用 Unity IAP。
如果这样做不起作用,请尝试断开再重新连接到互联网,然后重新登录到 Unity 服务并重新启用 Unity IAP。只有在已注册的组织中拥有 Unity 服务 “所有者” (owner) 或 “管理员” (manager) 角色的用户才能启用 Unity IAP 服务。
儿童网络隐私保护法 (COPPA) 适用于在线收集 13 岁以下儿童的个人信息的情况。这些规则明确了您必须在隐私政策中包含的内容,何时以及如何寻求让父母提供可核实的同意书,以及您必须承担哪些责任来保护儿童的网络隐私和安全。如果尚未在 Analytics 设置中指定 COPPA 选项,则会出现一个对话窗口,询问应用程序用户的目标年龄以确保符合 COPPA 法案。选择相应答案,然后单击 Save Changes。
要将 Unity IAP 包导入到项目中,请单击 Import。
导入包时,会自动将名为 Plugins 的新文件夹添加到项目。该文件夹包含使用 Unity IAP 所需的 UnityPurchasing 资源。
单击 Back to services 以查看 Services 面板。
确保 Analytics 和 In-App Purchasing 都标记为 __ON__(如下所示)。
您现在可以开始将 Unity IAP 实施到项目中。
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.