Fixed IAP issue

dev-ali
Hazim Bin Ijaz 3 weeks ago
parent b931fb90f9
commit 8b2df62895

@ -69,7 +69,6 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener
int coins = PlayerPrefs.GetInt("Coin"); int coins = PlayerPrefs.GetInt("Coin");
coinTxt.text = coins.ToString(); coinTxt.text = coins.ToString();
SetupBuilder(); SetupBuilder();
CheckIfProductPurchased();
PipePrefGetter(); PipePrefGetter();
} }
@ -107,6 +106,7 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener
//PlayerPrefs.SetInt("PipeButtonIsEquipped" + 0, 1); //PlayerPrefs.SetInt("PipeButtonIsEquipped" + 0, 1);
PlayerPrefs.SetInt("PipeButtonIsPurchased" + i, 1); PlayerPrefs.SetInt("PipeButtonIsPurchased" + i, 1);
Debug.Log("Pipe " + i + " is purchased already!"); Debug.Log("Pipe " + i + " is purchased already!");
AddPipes(i);
// Product is purchased, grant access to features // Product is purchased, grant access to features
} }
//else //else
@ -171,6 +171,7 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener
{ {
print("Success"); print("Success");
m_StoreController = controller; m_StoreController = controller;
CheckIfProductPurchased();
//CheckNonConsumable(ncItem.Id); //CheckNonConsumable(ncItem.Id);
//CheckSubscription(sItem.Id); //CheckSubscription(sItem.Id);
} }

@ -4,7 +4,7 @@
UnityConnectSettings: UnityConnectSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 1 serializedVersion: 1
m_Enabled: 0 m_Enabled: 1
m_TestMode: 0 m_TestMode: 0
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events m_EventUrl: https://cdp.cloud.unity3d.com/v1/events

Loading…
Cancel
Save