Search Unity

[Closed] IAP Issues Cannot Figure Out :(

Discussion in 'Unity IAP' started by BrodyDaChappy, Dec 21, 2016.

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

    BrodyDaChappy

    Joined:
    Jan 6, 2016
    Posts:
    10
    HI All,

    I have been trying to figure out this issue i am having with my Unity IAP for months now going back and forth with Unity.

    It will probably be best to view my Gist i created to help explain what i am experiencing, my game is already released and just waiting to release this new version so i can start some marketing,

    https://gist.github.com/AddyDaDaddy/6fa3dee342232faa03263a7dfe072a74

    What i am trying to do is, create a button on my main menu this is called "Remove Ads & Endless" clicking this initializes purchase, once complete the text on that same button changes to just "Endless", then when i click the button again i can access the newly purchased game mode.

    Problem is when exiting the game mode to main menu the text resets back to "Remove Ads & Endless" and i cannot purchase anything after that, the button just lags the game, but that then means i cannot access the new game mode :(.

    The Gist has all the code used and also more explanation, please can someone spot the mistake XD i just cannot figure it out.

    Cheers,

    Adam....
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @BrodyDaChappy

    Hi Adam,

    I would uncheck the "Collapse" option on the console. For issues like this (and in most cases) it is very important to see the order that the events are happening.
    collapse.PNG

    From the description, it sounds like the problem is in how the data is saved. Can you check the xml file and make sure the data is what you expect it to be when you disable ads and when you reload the scene.
     
  3. BrodyDaChappy

    BrodyDaChappy

    Joined:
    Jan 6, 2016
    Posts:
    10
    Hi @ap-unity,

    thank you for getting back to me, i will make the change and also have a look into it as soon as i get home from work tonight, i will let you know anything i find.

    Cheers,

    Adam.
     
    Last edited: Dec 22, 2016
  4. BrodyDaChappy

    BrodyDaChappy

    Joined:
    Jan 6, 2016
    Posts:
    10
    Hi @ap-unity

    I have just been checking the xml file and changing the code around to make sure that is saving accordingly, the purchase is perfectly fine, the Debug.Logs are all in order as they should be, i even swapped the purchase to =false that way i see if it actually does as it should and it did, it changed the text back to "Remove Ads & Endless" then i was unable to click.

    Entering Endless once available is fine and on exit i still get debugs for purchase process even after it has been purchased, so every-time i go into the endless mode it is acting as if purchase is still going.
    I really have no clue what the issue is, in the editor it is perfectly fine, once i build Alpha and test the purchase, i can purchase the product but once i go in and come out of endless it is as if the purchase is failing, which makes me belive that the fact the purchase is still happening once i leave the game mode maybe it is saying that the purchase has failed as it already has been purchased and then setting it back to = false meaning the text resets.
     
  5. BrodyDaChappy

    BrodyDaChappy

    Joined:
    Jan 6, 2016
    Posts:
    10
    HI @ap-unity
    After my recent tests it seems that the Text Changing is a little buggy, everything is working fine, once i purchase the product the text does not change until i have gone into a new scene, then come back to the main menu, also when i go into endless mode after the text does change, it changes back after coming out, but then closing and re-opening the game changes the text back and can access the new game mode.

    Adam.
     
    Last edited: Dec 28, 2016
Thread Status:
Not open for further replies.