I recently implemented Unity IAP using unity 5.3.2P3 and everything worked fine. I then created an animated loading screen (usual rotating ring), on which I called a SetActive(true) every time the user tried to make a purchase. I then set this loadingScreen to SetActive(false) in the purchase completion method (PurchaseProcessingResult()) or the purchase fail method (OnPurchaseFailure()). A simple activation and deactivation of this GameObject so that the user knows something is happening while they wait for say, the touch id prompt etc… However, the moment I implemented this, my purchases started to fail on occasion with a NullRefrenceException, which meant neither the purchase completion nor the purchase failure methods were called, leaving the loading screen spinning endlessly and forcing the user to quit the game. The moment I remove this loading screen then all IAPs go perfectly without a hitch. Can someone please tell me what could be causing this problem?
Hey @raglet ,
I wanted to check in and see if this response is addressing your question? [Solved] Unity IAP triggering double purchase - Unity Services - Unity Discussions
1 Like