Search Unity

[Closed] Unity IAP Loading Screen Issue

Discussion in 'Unity IAP' started by raglet, Mar 10, 2016.

Thread Status:
Not open for further replies.
  1. raglet

    raglet

    Joined:
    Nov 22, 2015
    Posts:
    30
    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?
     
  2. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    nicholasr likes this.
Thread Status:
Not open for further replies.