Search Unity

[Solved] Is StandardPurchasingModule documented anywhere?

Discussion in 'Unity IAP' started by jmakar, Jul 10, 2018.

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

    jmakar

    Joined:
    Jun 27, 2018
    Posts:
    18
    Hi - I don't see StandardPurchasingModule documented under the Unity Scripting API pages. But it does show up in various code snippets. I'm interested to read about the 'fake' and 'mock' behaviors it provides. If the documentation doesn't exist, maybe there is an article or something to explain?

    Thanks
     
  2. jmakar

    jmakar

    Joined:
    Jun 27, 2018
    Posts:
    18
    For future askers of this question: I'm pretty sure it is a 'no'. I've not found it anywhere.

    But here is what I've figured out so far:
    • You can set StandardPurchasingModule.Instance().useFakeStoreUIMode to 1 of 3 values:
      • Default - this provides no UI. I just seems to allow the Unity IAP API become NoOp in the editor. It allows the store to init, products to init, and purchases to act like they succeed.
      • StandardUser - this gives the user a modal popup when InitializePurchase is called which asks if they'd like to purchase the product, or cancel.
      • DeveloperUser - this gives the user modal popups for store initialization, additional product initialization, and for purchase initialization. In each of those scenarios the developer can choose if this should succeed or fail. And if fail, you can choose why.
    If you set useFakeStoreAlways=true I assume this means it will just use this NoOp behavior on all devices. But I've not tried.

    I have not tried anything having to do with the 'mock' ability. But a little research makes me think it is somehow just related to purchasing on the Windows platform.
     
    Last edited: Jul 13, 2018
    ap-unity likes this.
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @jmakar What problem are you trying to solve?
     
  4. jmakar

    jmakar

    Joined:
    Jun 27, 2018
    Posts:
    18
    I just wanted to read the documentation to learn what was possible. The documentation doesn't exist as far as I can tell. So I just needed to figure it out empirically. I wrote my findings above to help with anyone in the future who has similar search terms.
     
Thread Status:
Not open for further replies.