Demo sceen AllSelection unable to get Coins



  • How do I make the Demo scene behave like what I see in the YouTube video?
    Feels like there is a "Demo Mode" switch I'm supposed to tick, or some Event system I'm supposed to turn on.

    I load the scene AllSelection, pick the Vertical, Horizontal, etc and I can't 'buy' any Coins.
    Nothing happens when I press the $1.99 button except for the UI Color Tint goes to pressed.

    Very oddly, randomly I get "purchased pistol" appear in the Console. I've never tried to purchase the pistol. I have tried to buy the 250 bullets but I get a pop-up saying "Insufficient funds."

    I've added Debug.Log lines to HandleFailedPurchase() & HandleSuccessfulPurchase() and they never output to the Console. I've added debug to IAPItem.cs : Purchase() and that button press happens.

    I'm using Unity 2019.4.3 LTS & UnityIAP v1.23.4 and SIS v4.3.5 and the Plugin Setup window says OK 3 times.

    Thanks.



  • When running in the editor, Unity IAP is in a test mode. All real money purchases will succeed without prompts.

    I load the scene AllSelection, pick the Vertical, Horizontal, etc and I can't 'buy' any Coins.
    Nothing happens when I press the $1.99 button except for the UI Color Tint goes to pressed.

    Do you have any errors in your project? Clicking on a real money purchase (e.g. coins) should add them to your inventory instantly. Please post console error logs. Also check that on the IAPManager prefab (project and in the AllSelection scene) the IAPListener script is attached.

    Very oddly, randomly I get "purchased pistol" appear in the Console. I've never tried to purchase the pistol. I have tried to buy the 250 bullets but I get a pop-up saying > "Insufficient funds."

    You are getting that because the pistol is set to cost nothing in the IAP Settings window. Therefore it is granted on app launch automatically.



  • Hi,

    This is a freshly unpacked version of SIS, so the AllSelection is "as shipped" from the Asset Store. IAPManager is there as the 1st item in the Hierarchy. ShopManager is in the scene that loads next.

    There are no console log lines. I click "Vertical" it prints nothing not even "Loading". I click 1000 Coins $1.99, nothing is output to the Console.

    I added this
    public void Purchase()
    {
    Debug.Log("IAPItem.cs : Purchase(): " + this.productId.ToString());

    and now I get to the Console
    "IAPItem.cs : Purchase(): coins"

    I found public static bool isDebug = false; and manually changed it to true, no Console output.

    Debugging that follows the main logic flow of the asset would be super helpful out of the box, with a debug on/off checkbox on IAPManager I think would be good. As I mentioned I've started adding Debug.Log to HandleFailedPurchase() & HandleSuccessfulPurchase() also to try and figure out why it doesn't work. I can keep adding tomorrow I guess.



  • Checking "Development Build" on the Build Settings (to true) enables all debug output by Simple IAP System. You would not set this via code.

    Unfortunately I am not sure how to reproduce this. Did you enable Unity IAP in the Plugin Settings (Window > Simple IAP System) as well?



  • Yes, the issue is the Checkbox.
    The YouTube setup video at 3:15 shows how to do the Plugin Setup to enable/import Unity IAP, which I did, but the checkbox step is not shown as far as I can see.
    The 3 green OK's you see in the Plugin Setup made me think things were setup right too.

    The “Activate Unity IAP” step in the PDF file made me think that would enable real purchases, I've been wondering "where is the Sandbox?" so I didn't leap to enabling that.

    Thanks,
    Scott



  • The YouTube video is from 2016, things have changed slightly :) Good to hear that you got it working.


Log in to reply