LanguageEnglish
  • C#
  • JS

Script language

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

IDs.Add

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

Sumbission failed

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

Close

Cancel

public function Add(id: string, params stores: string[]): void;
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 Start() { IDs productIds = new IDs(); productIds.Add("levelpackfoo", new string[] {GooglePlay.Name, AppleAppStore.Name}); } }