Version: 2017.1

IDsConstructor

切换到手册
public IDs ();

描述

创建商店标识符到商店名称的新映射。

下面是针对商店类构建 IDs 的示例:

using UnityEngine;
using UnityEngine.Purchasing;

public class MyStoreConfiguration { public static ConfigurationBuilder CreateBuilder() { ConfigurationBuilder builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance()); // Use this approach when products have different identifiers on different stores. // Here, the store-specific ID is "levelpackfoo" for AppleAppStore and all others, // except for GooglePlay and WinRT where it is "com.unity3d.purchasing.levelpackfoo". IDs productIds = new IDs() { { "levelpackfoo" }, { "com.unity3d.purchasing.levelpackfoo", GooglePlay.Name, WinRT.Name } }; builder.AddProduct("levelpackfoo", ProductType.NonConsumable, productIds); return builder; } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961