Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question RemoteConfig / UGS Economy: configType keeps switching to "economy"

Discussion in 'Unity Remote Config' started by stu_dious, Mar 10, 2022.

  1. stu_dious

    stu_dious

    Joined:
    Feb 19, 2013
    Posts:
    32
    Hi, we're having a weird problem where ConfigManager.appConfig.configType keeps switching to "economy" when we'd expect it to be "settings".

    I've defaulted our FetchConfigsAsync call to include the paramater, "settings", but as soon as we call something like Economy.Configuration.GetInventoryItemsAsync then try say, ConfigManager.appConfig.GetKeys, it returns all our Economy keys, not the RC Settings.

    As a fix for now, I'm caching appConfig when configs are first fetched and future calls get 'settings' values from it rather than using ConfigManager.appConfig calls. Is there a better / recommended way to handle this? All examples I've found so far use ConfigManager.appConfig.Get# calls.

    Thanks, s
     
    Last edited: Mar 10, 2022
  2. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    283
    Hi Stu_dious,
    Thanks for reporting this,
    The team is currently looking into this and we will report back here with our findings.
     
    stu_dious likes this.
  3. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    283
    Hi Stu_dious,

    Apologies I forgot to ask what version of the packages you are running?
    We resolved a bug that matches what you have reported in the latest version of Economy. Please update your Economy package to the latest version.

    You can do that by opening the package manager by going to the Editor > Windows> Package Manager
    Locate Economy and press update.

    Thanks for sharing that additional information.

    Best,
    Seb
     
  4. stu_dious

    stu_dious

    Joined:
    Feb 19, 2013
    Posts:
    32
    Hi @Unity_SebT , I'm using Unity 2020.3.24f1 (also had same result on 2021.1.13f1). Updated to RemoteConfig3.0.0-pre.12 late yesterday.
    upload_2022-3-11_19-3-35.png
     
  5. stu_dious

    stu_dious

    Joined:
    Feb 19, 2013
    Posts:
    32
    Hi @Unity_SebT, just confirming this is still a bug for us. After USG initialisation, I can fetch the correct remote config keys but if I use Economy.Configuration.GetInventoryItemsAsync() then pull the remote config keys again, I'm get Economy->Configuration keys.
    Cheers, s
     
  6. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    283
    Hi @stu_dious
    Thanks for confirming.
    I am currently looking for a workaround. The issue is that the economy package pulls in an older dependency. You can see this dependency in your project folder > packages > packages.lock
    Modifying the lock file will be overridden on the next load. Looking for an alternative with the engineering team. Will update this post as soon as we have one.
     
    stu_dious likes this.
  7. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    283
    Hi @stu_dious,
    When you have a moment can you include the following code within your package manifest file add a , after dependencies open and closing bracket and paste the following code:
    upload_2022-3-15_18-45-19.png
    Code (CSharp):
    1. "enableLockFile": true,
    2. "resolutionStrategy": "highestPatch"
    Reload your project. it should resolve the packages Within the Project folder > Library > Package Cache you should now see remote config version
    upload_2022-3-15_18-40-20.png

    This should solve the original issue you were experiencing with economy async function.

    Can you let us know if this workaround helps? The issue reported here will be fixed in the next version of the economy package.

    All the best,
    Seb
     
    vd_unity likes this.