Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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:
    992
    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:
    992
    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:
    59
    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:
    992
    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.