Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Help!!!How to customize the initial port number of the server assigned by Unity Multiplayer.

Discussion in 'Game Server Hosting' started by WKMT, Oct 12, 2023.

  1. WKMT

    WKMT

    Joined:
    Mar 25, 2015
    Posts:
    1
    Hey Guys, we are developers from PlutoVR Studio. We have developed a multiplayer shooting VR game called Rampage Agents.

    We used Unity Multiplayer during development. When adapting to Quest devices, we discovered a problem.Starting from V43 of Quest SDK, when using Socket to connect to the server on port 9000, it will prompt that access is denied.

    However, the server assigned by Unity Multiplayer starts with port number 9000 (as shown in the figure below)
    upload_2023-10-12_20-20-7.png

    So I would like to ask, does Unity Multiplayer allow us to customize the starting port number of the server(Modify the $$port$$ value passed in the red box in the picture below)? Or Could you help us not let $$port$$ be worth 9000. For example, start from 9100.
    upload_2023-10-12_20-20-19.png

    Here are our Unity Multiplayer details:
    Project name: Rampage
    Project ID: 7b4e1130-69b8-435e-9743-1d57934606b2
     
  2. lewisw_unity

    lewisw_unity

    Unity Technologies

    Joined:
    May 19, 2018
    Posts:
    3
    Hey
    That is an interesting issue, very strange

    Right now we don't have a way for you to change the default port management, we're looking into this but there may be an alternative for the time being. Between each server you get 100 ports to use as you wish, but its really up to you which ones you use. (As long as you avoid the query port which is the base port + 10 normally).

    So you could instead add 1 to the port you receive on both the server and the allocation side, so port 9001, 9101, 9201 etc.

    Hopefully that helps!
     
    Last edited: Oct 17, 2023