Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

How reset user identification or cache

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

  1. Kodo

    Kodo

    Joined:
    Sep 6, 2014
    Posts:
    18
    Good day

    I'm use rule with "variant" type. And each time when i star game at Editor i receive identical values. In Release this ok. But what if i want test other variants. Can i reset some cache?

    What mechanism is used to identify that this is the same user? For example, on an android, a user can completely remove the application. And as I understand it, at the next installation, the cloud will set new values for them.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You would want to use the Development environment https://docs.unity3d.com/Packages/com.unity.remote-config@0.3/manual/ConfiguringYourProject.html What other variants do you need to test? https://docs.unity3d.com/Packages/com.unity.remote-config@0.3/manual/RulesAndSettings.html
     
  3. Kodo

    Kodo

    Joined:
    Sep 6, 2014
    Posts:
    18
    You link to 0.3. Now I use 1.2.

    But this is not what interests me. I want to know where remootconfig saves its data about user identifiers. Now it's all a black box.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I see, you want to be able to reset the locally cached values from the the last session, for example. Sorry for the confusion, I will check here.
     
  5. peterle_unity

    peterle_unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    8
    Hi Kodo! Thanks for reaching out about "variant" rules in Remote Config.

    We determine what variant to show each user based on the "customUserId" in the request, if it has been set. So if you want to experience different variants in your Unity editor, all you need to do is manually change your customUserId to something else. You can set this using our ConfigManager API:

    // Set the user’s unique ID:
    ConfigManager.SetCustomUserID("some-user-id");

    https://docs.unity3d.com/Packages/com.unity.remote-config@1.2/manual/CodeIntegration.html

    Setting your customUserId to something else will return a random variant, so if you are interested in FORCING your editor to experience a particular variant - you can temporarily set that variant's "weight" to 100 to force all requests to return with that variant, even in your editor when you press "play". You can do this either in the Remote Config Unity package UI, or on our web dashboard:
    https://app.remote-config.unity3d.com/

    Hope this helps!
     
    Last edited: May 20, 2020
  6. Kodo

    Kodo

    Joined:
    Sep 6, 2014
    Posts:
    18
    Yes.
    What the Peterle_unity suggested is a good option. Although unfortunately this is not a full reset.
    Thank you.