Symptoms
- I am unable to change the Store that Unity IAP targets.
- I would like to switch (for example) from Google Play to Amazon Appstore?
Cause
You wish to use the correct app store when using the IAP service within your game.
Resolution
Manually set the Android store (aka “Android Flavor”) using the Window > Unity IAP > Android > Target Amazon menu item.
Or programmatically call UnityPurchasingEditor.TargetAndroidStore():
using UnityEngine;
using System.Collections;
using UnityEngine.Purchasing;
public class Example : MonoBehaviour {
void SetAndroidStoreTarget ()
{
UnityPurchasingEditor.TargetAndroidStore(AndroidStore.AmazonAppStore);
}
}
Comments
2 comments
For me it doesn't show select store at runtime option in the submenu.
Refer to the screenshot below:
Hi Rachlt,
Yes, I will need to update this article.
After speaking with a colleague I was told that the menu option is gone, but the example code in the following forum post works.
https://forum.unity3d.com/threads/set-android-iap-target-on-rumtime.435790/
If you have any further questions please send us a support ticket via the analytics dashboard.
Article is closed for comments.