Search Unity

Local Config

Discussion in 'Unity Remote Config' started by ShawnFeatherly, May 19, 2020.

  1. ShawnFeatherly

    ShawnFeatherly

    Joined:
    Feb 22, 2013
    Posts:
    57
    Remote Config has so many more features that PlayerPrefs. Is there a way I can use Remote Config for local config? That is having Remote Config only load default settings and not set up a cloud project ID?

    If not, can you recommend a way to do local config? Is PlayerPrefs the best way to go?

    I realize this takes away the core feature of Remote Config. Using it for local config does open up a transition path to the Cloud service.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Remote Config would not store user data, it provides configuration data to the client based on rules.
     
  3. ShawnFeatherly

    ShawnFeatherly

    Joined:
    Feb 22, 2013
    Posts:
    57
    Thanks @JeffDUnity3D , my issue isn't with storing user data or client based rules, so I'm not sure how to interpret the comment above in the context of my needs.

    I'd like to modify configuration data locally in a way similar to how Remote Config values can be modified in the Unity editor. In a build of the project, I would initialize those configuration values from a local file the user, or a batch script, can modify to re-config the app, such as a *.json or *.ini file. The closest way I know of to do that is PlayerPrefs.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you be specific regarding what configuration data you are referring to? PlayerPrefs is generally used to store runtime user-specific values, Remote Config provides a means to update rule based values (Android, iOS, etc) but not per user. When you refer to user, are you referring to a game user, or the Editor user (the developer)?
     
    ShawnFeatherly likes this.
  5. ShawnFeatherly

    ShawnFeatherly

    Joined:
    Feb 22, 2013
    Posts:
    57
    Thanks for helping me think this through, @JeffDUnity3D . I'm referring to the game user. Sounds like PlayerPrefs is probably the best solution. Thanks!

    In my case, someone chaperons the running of the game per user. Here's my full goal. I'm writing software that will be used to run user studies in a lab not connected to the internet. The configuration of the built application is modified differently from one participant to the next, usually in a *.json file. Some example values would be an on disk file path that gets loaded into the study or an array of Vector3 positions.

    When I'm writing the study in Unity I want to test different configuration values in the Unity editor that will load in a similar way as the *.json built study.
     
    JeffDUnity3D likes this.