Dynamically loading exclusively from PlayFab



  • Hello,

    I was wondering if it is possible to load all of my IAP, real or virtual, exclusively from PlayFab. I want to be able to have random virtual items that changes every so many hours and I want this to be updated via PlayFab.
    Some items may or not be available when my app is released. I want to have the ability to control all of the virtual items after my app is released. Is this possible?

    Thanks.



  • Hello and welcome,

    this is definitely possible, but comes with a limitation:

    You cannot create completely new products in PlayFab, without your app knowing them. Meaning, the products need to be defined within the app - in the IAPSettings editor window of Simple IAP System - first. This is because Unity actively fetches the products from Unity IAP / PlayFab. You also want to add all of your products to the IAPListener script, so your app knows what to do with them.

    With that set up, you could:

    • prevent the ShopManager from spawning any of the items in the shop scene
    • add an attribute in PlayFab per product, e.g. in the "Custom Data" section, or even in the product title. Something like "Visible = True" or "2000 Coins (Visible)"
    • within the app, Simple IAP System receives that attribute. After checking it, let the items with that attribute spawn in the shop scene
      -> this allows spawning items dynamically via configuration in PlayFab.

    There are numerous other approaches that could be done here as well. For example, PlayFab also allows storing "Title Data" under the "Content" tab. In there, you could have a "Visible" key defining the product identifiers which should be visible as value. On app launch, download+save the title data and let the ShopManager only instantiate the defined items.

    Hope this helps! Let me know if you had something else in mind.



  • @Baroni Thanks for the quick response. I will try this out.


Log in to reply