Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is already a player for this connection - If scene changed #3718

Closed
Umareo opened this issue Jan 5, 2024 · 1 comment
Closed

There is already a player for this connection - If scene changed #3718

Umareo opened this issue Jan 5, 2024 · 1 comment

Comments

@Umareo
Copy link

Umareo commented Jan 5, 2024

Describe the bug
Hello! Can somebody help finding a solution to the problem. So I am developing a multiplayer game using Mirror for networking. I have for now 2 scenes. 1 being an online lobby scene and the next being a online map scene. I want the server to be changing the maps dynamically from one scene to another for all the clients.

This works well when the clients connect to the lobby scene. And only then the Server changes the scene. However, when the client tries to join the online map scene AFTER the server has changed the scene, the server shows an error "There is already a player for this connection". And therefore, the client cannot join.

I use the following simple code to change the scene. The method LoadScene() is attached to a button and is run on the server instance.

public void LoadScene()
{
if (isServer)
{
manager.ServerChangeScene("TestMapScene");
}
}

  • Build target: Android
  • Unity version: 2022.3.9f1
  • Mirror version: 86.13.4

Снимок экрана 2024-01-05 005752

@MrGadget1024
Copy link
Collaborator

Bug reports is not a place for seeking support...please join our Discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants