Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Unity IAP Docs

Discussion in '5.3 Beta' started by Baroni, Sep 30, 2015.

  1. dail

    dail

    Joined:
    Dec 5, 2013
    Posts:
    8
    I published my test game (Windows 10 mobile) in the Windows Store but he's giving initialization failed. The problem is in the addition of the products. Ex: I have 2 consumables in store with the name 10_coins and other 50_coins. So would look like this in the code?

    Code (CSharp):
    1. Builder. AddProduct ("10_coins", ProductType. Consumable, new IDs () {{"10_coins", WinRt .name},});
    2. Builder. AddProduct ("50_coins", ProductType. Consumable, new IDs () {{"50_coins", WinRt .name},});
    Someone help?
     
    Last edited: Dec 2, 2015
  2. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    If you have defined a product as '10_coins' on the microsoft publisher console then you do not need to specify store specific IDs, simply:

    Code (CSharp):
    1. builder.AddProduct("10_coins", ProductType.Consumable);
    But that would not be causing the initialisation failure. Please sideload your app from visual studio, launch it and send the trace from the debug window in visual studio as it starts up.
     
  3. dail

    dail

    Joined:
    Dec 5, 2013
    Posts:
    8
    Thank you. Works perfectly
     
unityunity