Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

error There is already a player at that playerControllerId for this connections unity

Discussion in 'Connected Games' started by ooza, Jan 8, 2017.

  1. ooza

    ooza

    Joined:
    Dec 12, 2016
    Posts:
    2
    Hi,
    When Online Scene in component Network Manager is not none Everything is fine.
    But When Online Scene in component Network Manager is none and i want change scene With code
    "NetworkManager.singleton.ServerChangeScene()"
    Was shown the following error:
    There is already a player at that playerControllerId for this connections

    Please Help Me.
     
  2. onionman77

    onionman77

    Joined:
    Nov 3, 2013
    Posts:
    1
    Hi. I know this is late, but I was struggling with this issue for 2 weeks, and none of the other solutions were working for me. So in my case, this was happening when the client was ready to change to the next scene before the server was. It would want to spawn a player before the server was ready and that was what was causing this.

    So the way I solved it, was to disable auto-create player on the Client side, and have the server send a network message to the client to let it know it had succesfully changed scene and was ready to let it spawn it's player ( with ClientScene.AddPlayer(0) ).

    That answer was for anyone that found this through google and had that issue. Your specific problem. Online Scene should always be set. That's just the default first scene to load when you connect to or start a server. You can still change scenes with ChangeNetworkScene as normal after that.
     
    Last edited: Jul 4, 2018
  3. billymonks

    billymonks

    Joined:
    Nov 19, 2016
    Posts:
    1
    @onionman77 I've been struggling with this same issue, but I'm having trouble sending a network message from the server to the client. Currently trying to write a message in OnServerSceneChanged, but having issues, either getting an error "Must call AddPlayer() with a connection the first time to become ready." or just nothing happening.

    Could you please provide some more details about your implementation? Your post is the only acknowledgement of this issue I've been able to find.