Search Unity

StoreView needs refresh?

Discussion in 'Game Foundation' started by metiscoda, Aug 29, 2020.

  1. metiscoda

    metiscoda

    Joined:
    Nov 18, 2013
    Posts:
    41
    I have two stores - one for IAP and one for my game items using virtual currency. I have a StoreView on the root GO of each of these which gets enabled when that particular store is active. Each StoreView will have the correct storeKey set up. I can purchase gems from my IAP store, and that will change my total gems that I have. Now if I activate the item store which uses gems to purchase items, the ones that are purchaseable with the new balance of gems still appear greyed out. I believe this is because that StoreView was disabled when the transaction occured and gems were added. If on the other hand I purchase one the items and it changes my gem balance, all the items that are affordable with my new gem balance appear purchaseable. The only way to work around this issue I found was to enable the GameObject for the StoreView, and then change the store key using SetStoreKey to a third empty store definition and then change it back to the item store key.
     
  2. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
  3. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    metiscoda likes this.
  4. metiscoda

    metiscoda

    Joined:
    Nov 18, 2013
    Posts:
    41
    Thank you.
     
    erika_d likes this.