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

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

IDs.Add

public void Add(string id, params object[] stores);
public void Add(string id, params string[] stores);

Parameters

id Platform specific Product ID.
stores Array of platform names using this Product ID.

Description

Add a product ID which is supported by a list of store platform names.

Here is an example of adding to an IDs:

using UnityEngine;
using UnityEngine.Purchasing;

public class MyGameClass : MonoBehaviour { void Awake() { IDs productIds = new IDs(); productIds.Add("levelpackfoo", new string[] {GooglePlay.Name, AppleAppStore.Name}); } }