Your application must provide a list of products for sale. Each product must be of one of the following Types:
Consumable | 반복 구매가 가능한 상품입니다. 가상 화폐 같은 소비 가능한 아이템에 적합하고, 복구가 불가능합니다. |
NonConsumable | 한 번만 구매할 수 있습니다. 추가 레벨 같은 일회성 구매에 적합하고 복구 가능합니다. |
Subscription | 유효 기간이 있으며, 복구 가능합니다. |
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.