Version: 2017.4
内购推荐 (IAP Promo) 广告位
推荐 (Promotions)

内购推荐 (IAP Promo) 商品目录

Unity IAP provides quick and easy tools to create and export Product Catalogs. Use the Unity Editor’s IAP Catalog window to populate Product metadata, then export the catalog to the Developer Dashboard to configure each Product’s creative assets. Note that you must use the IAP Catalog function to export Products to the dashboard.

创建商品目录

在 IAP Catalog 窗口中添加商品

In the Editor, select Window > UnityIAP > IAP Catalog to open the IAP Catalog window. This GUI lists all of your previously configured Products, and allows you to define the following attributes for each:

  • Name
  • Product ID
  • Type (IAP Promo now supports both Consumable and Non-consumable Product Types)
  • Price (Unity recommends specifying price points for Google and Apple stores independently if your app supports both)

注意:__商品目录__必须至少配置一个__商品__才能导出。有关设置__商品__的完整过程,请参阅有关 Codeless IAP 的文档。

您可能已经使用构建器 (builder) 脚本为 Unity IAP 填充了__商品目录__。例如:

var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
builder.AddProduct(product_coins, ProductType.Consumable);
builder.AddProduct(product_hat, ProductType.NonConsumable);
builder.AddProduct(product_elite, ProductType.Subscription);

Because IAP Promo only supports JSON exports from the Editor IAP Catalog GUI, we recommend modifying your approach as follows:

1.将__商品__复制粘贴到 IAP Catalog GUI。 2.从购买脚本中删除或注释掉现有的 builder.AddProduct() 代码。 3. Add the following code before initializing IAP to fetch your Product list from the IAP Catalog GUI:

StandardPurchasingModule module = StandardPurchasingModule.Instance();
ProductCatalog catalog = ProductCatalog.LoadDefaultCatalog();
ConfigurationBuilder builder = ConfigurationBuilder.Instance(module);
IAPConfigurationHelper.PopulateConfigurationBuilder(ref builder, catalog);

UnityPurchasing.Initialize(this, builder);

导出商品目录

In the IAP Catalog window, select App Store Export > Cloud JSON to export a local copy of the Product Catalog.

将商品目录导出到 JSON
将商品目录导出到 JSON

在开发者控制面板 (Developer Dashboard) 中配置创意资源

Manage your Product Catalog on the Operate page of the Developer Dashboard. Your active Project appears in the top-left corner. To manage Products, select Monetization > Define In-App Purchases from the left navigation bar.

可以手动填充商品,也可以通过导入 JSON 文件批量填充商品。

手动创建商品

Click the ADD NEW PRODUCT button in the top-right corner to view the Product configuration window, then enter the following details:

  • __Product ID__(在 IAP 代码中引用)
  • Name
  • Consumable or Non-Consumable
  • Apple App Store Price (USD)
  • Google Play Store Price (USD)
在开发者控制面板 (Developer Dashboard) 上手动添加新的 IAP 商品
在开发者控制面板 (Developer Dashboard) 上手动添加新的 IAP 商品

单击 SAVE 按钮可将商品存储到目录中。

导入商品目录

要设置新的__商品目录__或更新目录中的现有__商品__:

  1. Select UPLOAD JSON.
  2. Select the JSON file you exported from the Unity Editor. A diff log then prompts you to approve changes. Check the contents of the file, then select APPROVE CHANGES.
将 IAP 商品目录导入开发者控制面板 (Developer Dashboard)
将 IAP 商品目录导入开发者控制面板 (Developer Dashboard)

The imported Products appear in the Product Catalog list. However, in order to be eligible for Promotions, each Product must have an associated creative asset (otherwise there is nothing for the Placement to display).

分配创意资源

要添加创意资源,请遵循以下步骤:

  1. Select a Product from the Product Catalog list, then scroll down to the Creative Uploads section.

    Note: While each Product’s Product ID, Name, Price, and Type appear in the dashboard, you can only edit these attributes from the Editor’s IAP Catalog window.

  2. To specify unique creative assets for different regions, select ADD LANGUAGE, then check the languages to include.



    Incorporating unique creative assets for different languages in the Developer Dashboard
    Note: The drop-down indicates the current language you are editing. If an included language has no creative assets, it defaults to using its English (United States) creative assets.

  3. Upload Portrait or Landscape creative assets for phone and tablet devices, with the following guidelines:

    • PNG 或 JPG 文件格式。
    • 每个__商品__要求一个创意资源至少有一种配置才符合__推荐 (Promotions)__ 的条件。为了获得更好的消费体验,请为每种设备和方向提供经过优化的创意资源。
    • Phone creative asset dimensions are 580 x 1035 pixels for portrait orientation, and 1035 x 580 pixels for landscape orientation.
    • Tablet creative asset dimensions are 900 x 1200 pixels for portrait orientation, and 1200 x 900 pixels for landscape orientation.
  4. Select UPLOAD CREATIVE to upload a creative asset. A preview appears on the left.

  5. Select UPLOAD PURCHASE BUTTON to place an interactive button on the creative asset, with the following guidelines:

    • 必须上传购买按钮才能继续。
    • 按钮资源的最小文件大小为 60 x 60 像素。
    • 可以单击并拖动预览窗口上的购买按钮来放置该按钮。
    • 可以设置按钮文本的字体、颜色和大小。

      开发者控制面板 (Developer Dashboard) 中的创意资源上传界面概览
  6. Select SAVE to proceed. Upon returning to the Product Catalog page, your Product is now Promotion Eligible.

    A Product that is now eligible for use in Promotions in the Developer Dashboard

Note: You must export and submit your Product Catalog to the appropriate Google Play or iTunes store for the purchase flow to work. Please see the Export section in the documentation on Codeless IAP.


内购推荐 (IAP Promo) 广告位
推荐 (Promotions)