Search Unity

Question Access Catalog from script?

Discussion in 'Unity IAP' started by KingKRoecks, May 31, 2022.

  1. KingKRoecks

    KingKRoecks

    Joined:
    Jul 28, 2013
    Posts:
    155
    I'm currently working on building up my store data in Google Play.

    I noticed there's the ability to Export/Import CSV with the IAP Catalog, so I've start creating some products to upload.

    From reading the manual, I learned that IAP initialization with the catalog might only happen if you have it set to automatically initialize when it sees a Codeless IAP object in the scene.

    https://docs.unity3d.com/Packages/com.unity.purchasing@4.2/manual/UnityIAPInitialization.html

    So since there is a checkmark to automatically register, that implies that there should be a way to register at runtime through a script.

    So is there a way to access the IAP catalog from a script?
     
  2. TermerAlexander

    TermerAlexander

    Joined:
    Jan 25, 2016
    Posts:
    10
    KingKRoecks likes this.
  3. KingKRoecks

    KingKRoecks

    Joined:
    Jul 28, 2013
    Posts:
    155
    Thanks for the reply!

    I ultimately just ended up writing my own CSV exporter based on my item definitions.
    Trying to work with the Codeless IAP in my heavily scripted environment was more trouble than it was worth :)