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.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Testing locally on the same computer without making a build

Discussion in 'Authentication' started by spinaljack, Aug 15, 2022.

  1. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    942
    Hi,
    When testing locally how can I get different player IDs on the same computer without making a build?
    Signing out and signing back in with a different method still gives the same player ID.
     
  2. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    942
    https://docs.unity.com/authentication/ProfileManagement.html
    Using authentication profile management on the other editor gives this error on the main editor:

    Unity.Services.Authentication.AuthenticationException: Invalid state for this operation. The player is already signed in.

    But interestingly it continues to let me use Lobby services afterwards
     
    Last edited: Aug 15, 2022
  3. veleek_unity

    veleek_unity

    Ben Randall Unity Technologies

    Joined:
    Aug 25, 2021
    Posts:
    36
    SwitchProfile will throw an Invalid State error if you're trying to switch profiles while the current profile is signed in. Unity Authentication doesn't support multiple profiles signed in at the same time, so you should sign-out prior to using SwitchProfile and then sign-in again.
     
  4. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    942
    I signed out on the other editor before switching profiles but the main editor is the one that gets the error messages.
    It still works and I can test this way (with 2 editors on the same machine) I'm just reporting what happens.