From 8b2df62895e5f62fb2ad5956b5ff3b6525651597 Mon Sep 17 00:00:00 2001 From: Hazim Bin Ijaz Date: Tue, 5 Nov 2024 14:45:58 +0500 Subject: [PATCH] Fixed IAP issue --- Assets/ShopManager.cs | 3 ++- ProjectSettings/UnityConnectSettings.asset | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/ShopManager.cs b/Assets/ShopManager.cs index 5645babf..e02615e3 100644 --- a/Assets/ShopManager.cs +++ b/Assets/ShopManager.cs @@ -69,7 +69,6 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener int coins = PlayerPrefs.GetInt("Coin"); coinTxt.text = coins.ToString(); SetupBuilder(); - CheckIfProductPurchased(); PipePrefGetter(); } @@ -107,6 +106,7 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener //PlayerPrefs.SetInt("PipeButtonIsEquipped" + 0, 1); PlayerPrefs.SetInt("PipeButtonIsPurchased" + i, 1); Debug.Log("Pipe " + i + " is purchased already!"); + AddPipes(i); // Product is purchased, grant access to features } //else @@ -171,6 +171,7 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener { print("Success"); m_StoreController = controller; + CheckIfProductPurchased(); //CheckNonConsumable(ncItem.Id); //CheckSubscription(sItem.Id); } diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset index 6a40b219..f86591eb 100644 --- a/ProjectSettings/UnityConnectSettings.asset +++ b/ProjectSettings/UnityConnectSettings.asset @@ -4,7 +4,7 @@ UnityConnectSettings: m_ObjectHideFlags: 0 serializedVersion: 1 - m_Enabled: 0 + m_Enabled: 1 m_TestMode: 0 m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events m_EventUrl: https://cdp.cloud.unity3d.com/v1/events