Search Unity

Question remotesettings.getstring is not working

Discussion in 'Unity Analytics' started by mfatihbarut, Dec 30, 2021.

  1. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    Hi,
    As far as ı see remotesettings.getstring is not working
    I read some messages about it which say it has bugs.
    Is it still bugy or am I doing something wrong?
    string Version = RemoteSettings.GetString("Version");

    upload_2021-12-30_13-33-28.png
     
  2. RandolfKlemola

    RandolfKlemola

    Unity Technologies

    Joined:
    May 1, 2020
    Posts:
    130
    Hey there,

    Thank you for reaching out! That line you're using might be a little outdated. Can you try this line and let us know the results?

     string Version = ConfigManager.appConfig.GetString("Version"); 


    You can find in this documentation: Remote Config - Code Integration
     
  3. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    I also got error when I tried to use this.
     
  4. RandolfKlemola

    RandolfKlemola

    Unity Technologies

    Joined:
    May 1, 2020
    Posts:
    130
    Can you share the error you're seeing, related to this? Did you Push the change after adding the String?

    Thanks!
     
  5. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    yes that was pushed and sorry for can not share the error because I removed that pack from my project and found another solution including an external server to keep the version number.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You mentioned that you are using Remote Settings, but that service has been deprecated in favor of Remote Config. The code would be different for the two. But I see you already found a work around.