Legacy Documentation: Version 2018.2 (Go to current version)
LanguageEnglish
  • C#

IDs Constructor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public IDs();

Description

Create a new mapping of store identifiers to store names.

Here is an example of constructing an IDs for a store class:

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; } }
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答