Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[SOLVED] Multiplayer || Editor Problem?

Discussion in 'Multiplayer' started by Deleted User, May 10, 2017.

  1. Deleted User

    Deleted User

    Guest

    Hey everyone,

    Just a quick question.
    I've been trying to figure out in my head what is happening here, and finally sick enough of this problem that I need to do something about it now, as it is now hindering my workflow.

    Preface:
    I've created a fully functional authoritative server and separate client that uses prediction for my game.

    Everything is working as expected and perfect in the following cases:
    Client.exe & Server.exe ran on same computer
    Client.exe on computer 1, Server.exe on computer 2

    Unity Editor(Client) & Unity Editor(server) ran on same computer
    Unity Editor(Client) on computer 1 & Server.exe on computer 2
    Client.exe on computer 1 & UnityEditor(Server) on computer 2

    Problem:
    Unity Editor (Client) on computer 1 & Unity Editor (Server) on computer 2

    So essentially, when I want to run the Unity Editor(Client) on one computer for debugging, and have the Unity Editor(Server) on a different computer for debugging the Client and Server are no longer able to communicate with one another.

    Just as a quick assumption, I think this may have to do with being ran from inside the UnityEditor process, on separate computers?

    Hope to find someone that has had and solved this problem before that can give me some ideas on what to check or how to fix, as I would really like the ability to debug within Unity on separate computers.

    Thanks,
    Andy

    PS,
    Client.exe and Server.exe are different projects.
     
  2. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I use the same setup, but haven't had problems when using either within the editor. Are you using uNet?
     
  3. Deleted User

    Deleted User

    Guest

    Hi Whippets,

    Yes, I'm using the transport layer of uNet.

    After some fiddling around the only problem I have is when I have the server running behind the editor.

    If the server and client are on different computers, and the server is running from within the Unity Editor, the client cannot make a connection, even when I swap what computer is running UnityEditor(server.exe).

    I'm a bit baffled now because every other scenario the client successfully connects to the server and process messages normally.
     
  4. Deleted User

    Deleted User

    Guest

    I fixed the issue.

    If anyone else has this problem,
    I had to - Windows10-ControlPanel-Windows Firewall-Inbound Rules and delete a bunch of stale rules for the Unity Editor that were created there.

    After clearing, everything is working as intended on separate computers now, within the editor and without.
     
    Whippets likes this.
  5. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    That's one to note and remember. Well discovered.