Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question How to test overrides value

Discussion in 'Unity Remote Config' started by Max_power1965, Aug 19, 2022.

  1. Max_power1965

    Max_power1965

    Joined:
    Oct 31, 2013
    Posts:
    124
    I've configured remote config and setted the override values in 5 groups to run an A/B test, every time I run the code from the editor, I always get the same result which is the value from the group number one (as expected).
    is there a way to test the other values within the editor, just to be sure that everything works as expected?
     
  2. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    104
    Hi @Max_power1965
    Your session is tied with your playerID, so clearing your PlayerPrefs should do the trick
     
  3. Max_power1965

    Max_power1965

    Joined:
    Oct 31, 2013
    Posts:
    124
    I tried but it doesn't seem to work, is there another way to clear the playerID? Also ,I'm using
    SignInAnonymouslyAsync method to Sing in, I don't know if it's relevant.
     
  4. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    104
    I'd suggest to make a button (for testing purposes) and set it to clear your playerprefs, then stop the game, start the game again, you should then create a new playerID, you can confirm if your playerID is different in the console.

    It might just be that you are getting the same result by chance rather than any issue with your code. Keep trying and it should role a new chance different to what you were getting.

    If you continue getting the same one after trying some many times, let me know and I'll investigate further.
     
  5. domonyiv

    domonyiv

    Joined:
    Oct 1, 2016
    Posts:
    55
    @Julian-Unity3D

    UPDATE: It seems that this problem only occurs in the editor.

    I have the same problem as above, no matter how many times I clear the PlayerPrefs (Using the Editor Edit>Clear all PlayerPrefs menu) and get a new playerID, the remote config value is the same every time.

    I am logging the playerId like this:

    Code (CSharp):
    1.  
    2. if (!AuthenticationService.Instance.IsSignedIn)
    3. {
    4.   await AuthenticationService.Instance.SignInAnonymouslyAsync();
    5.  
    6.   Debug.Log(AuthenticationService.Instance.PlayerId);        
    7. }
    My Game override is only a single INT what can be 1 (50%) or 2 (50%) Audience Type is All Players, Rollout Percentage: 100% of selected audience.

    I am using Unity 2021.3.17f, Remote config 3.3.1, Authentication 2.4.0

    @Max_power1965 Were you able to solve the problem?
     
    Last edited: Jan 31, 2023 at 3:25 PM