Legacy Documentation: Version 5.3
Configuring for Tizen Store
Initialization

Defining products

Your application must provide a list of products for sale. Each product must be of one of the following Types:

Consumable Can be purchased repeatedly. Suitable for consumable items such as virtual currencies. Cannot be restored.
NonConsumable Can only be purchased once. Suitable for one-off purchases such as extra levels. Restorable.
Subscription Has a finite window of validity. Restorable.

A cross-store identifier must also be supplied, and by default Unity IAP assumes this is the same identifier configured on each specific store.

Where your products have different identifiers on different stores you must inform Unity IAP when defining them. For example, the following snippet defines a product known as ‘100_gold_coins_google’ on Google Play, ‘100_gold_coins_mac’ on the Mac App Store and ‘100_gold_coins’ on all other platforms.

using UnityEngine;
using UnityEngine.Purchasing;

public class MyIAPManager {
    public MyIAPManager () {
        var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
        builder.AddProduct("100_gold_coins", ProductType.Consumable, new IDs
        {
            {"100_gold_coins_google", GooglePlay.Name},
            {"100_gold_coins_mac", MacAppStore.Name}
        });
    }
}

Note that defining store specific identifiers changes only the identifier Unity IAP uses when communicating with stores; you should continue to use the product’s cross-platform identifier when making API calls.

Configuring for Tizen Store
Initialization
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961