Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Changing key values through script

Discussion in 'Unity Remote Config' started by RedTShirtGaming, May 3, 2022.

  1. RedTShirtGaming

    RedTShirtGaming

    Joined:
    Mar 10, 2021
    Posts:
    4
    Hi!
    Using remote config, is there a way of changing key values through a C# script?
    Thanks. :)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I'm checking on this for you, and will follow up.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  4. RedTShirtGaming

    RedTShirtGaming

    Joined:
    Mar 10, 2021
    Posts:
    4
    Thank you. I'll try and add this to my project and see what it does. Are you able to suggest any videos that explain what to do? :)
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    A Google search for "rest api from c# video" should do the trick!
     
  6. RedTShirtGaming

    RedTShirtGaming

    Joined:
    Mar 10, 2021
    Posts:
    4
    Found some videos! Thank you for your help :)
     
  7. JJRivers

    JJRivers

    Joined:
    Oct 16, 2018
    Posts:
    137
    That isn't technically true, all the necessary tools to achieve it are there, someone just didn't bother to write any comments to any of the methods in the RemoteConfigWindowController.cs, RemoteConfigDataStore.cs, RemoteConfigWebApiClient.cs or in the RemoteConfig documentation, in any sense of the word.

    I figured out how to use it most of the way down, got the service to accept my custom JArray's formatting now, but the next hurdle is something that is pure greek to me, upon POSTing my custom keyvalue with RemoteConfigWebApiClient.PostConfig(params) i get this as a response:

    Code (CSharp):
    1. Failed to push remote config: HTTP/1.1 400 Bad Request
    2. Supplied config type already exists.
    3.  
    Would greatly appreciate if you could elucidate what the issue is with that.
     
    Last edited: Oct 1, 2022
  8. Metsk3r

    Metsk3r

    Joined:
    Nov 1, 2022
    Posts:
    2
    Same here. I am facing this problem even using cURL. I have no idea why it's working only within their system and nowhere else.