Bu kod ile reklamları kaldırma ozelliği eklemek istedim. Reklamları nasıl kaldırcağımı bilmediğim icin aklıma reklam scriptini kapatmak geldi ama oyunda buy dediğimde:
Kod:Panoya kopyala
NullReferenceException: Object reference not set to an instance of an object IAPManager.OnPurchaseComplete (UnityEngine.Purchasing.Product product) (at Assets/script/satınalma/IAPManager.cs:13) UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at :0) UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at :0) UnityEngine.Purchasing.IAPButton.ProcessPurchase (UnityEngine.Purchasing.PurchaseEventArgs e) (at Library/PackageCache/[email protected]/Runtime/Codeless/IAPButton.cs:199) UnityEngine.Purchasing.CodelessIAPStoreListener.Pr ocessPurchase (UnityEngine.Purchasing.PurchaseEventArgs e) (at Library/PackageCache/[email protected]/Runtime/Codeless/CodelessIAPStoreListener.cs:295) UnityEngine.Purchasing.StoreListenerProxy.ProcessP urchase (UnityEngine.Purchasing.PurchaseEventArgs e) (at Library/PackageCache/[email protected]/Runtime/Purchasing/StoreListenerProxy.cs:34) UnityEngine.Purchasing.PurchasingManager.ProcessPu rchaseIfNew (UnityEngine.Purchasing.Product product) (at Library/PackageCache/[email protected]/Runtime/Purchasing/PurchasingManager.cs:288) UnityEngine.Purchasing.PurchasingManager.OnPurchas eSucceeded (System.String id, System.String receipt, System.String transactionId) (at Library/PackageCache/[email protected]/Runtime/Purchasing/PurchasingManager.cs:123) UnityEngine.Purchasing.JSONStore.OnPurchaseSucceed ed (System.String id, System.String receipt, System.String transactionID) (at Library/PackageCache/[email protected]/Runtime/Stores/BaseStore/JSONStore.cs:168) UnityEngine.Purchasing.FakeStore.n__0 (System.String id, System.String receipt, System.String transactionID) (at :0) UnityEngine.Purchasing.FakeStore+c__DisplayClass15 _0.g__handleAllowPurchase|0 (System.Boolean allow, UnityEngine.Purchasing.PurchaseFailureReason failureReason) (at Library/PackageCache/[email protected]/Runtime/Stores/FakeStore/FakeStore.cs:142) UnityEngine.Purchasing.UIFakeStore+c__DisplayClass 10_0`1[T].b__0 (System.Boolean result, System.Int32 codeValue) (at Library/PackageCache/email protected/Runtime/Stores/FakeStore/UIFakeStore.cs:72) UnityEngine.Purchasing.UIFakeStore.OkayButtonClick ed () (at Library/PackageCache/email protected/Runtime/Stores/FakeStore/UIFakeStore.cs:253) UnityEngine.Purchasing.UIFakeStoreWindow.OnOkClick ed () (at Library/PackageCache/email protected/Runtime/Stores/FakeStore/UIFakeStoreWindow.cs:89) UnityEngine.Purchasing.UIFakeStoreWindow.DoMainGUI (System.Int32 windowID) (at Library/PackageCache/email protected/Runtime/Stores/FakeStore/UIFakeStoreWindow.cs:68) UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at :0)
Bu hatayı alıyorum. Nasıl cozebilirim?