I can’t find a way to get the query port number for server.json. If I put any port number, it will be assigned automatically?
I can find the query type in build configure of Multiplay Hosting cloud service though.
Hi @lukechodev,
The server.json file is used by the Multiplay SDK (or the Multiplayer SDK, since it encapsulates it) and automatically provided on the dedicated server when using Multiplay Hosting.
Would you mind clarifying the context of your question ? (Which SDK you chose to use, what kind of multiplayer experience you are aiming for, in which step of your game development did this issue arise, …)
The question was whether server.json should be directly assigned to the Home path when building a docker container image like
COPY Server.json $HOME/Server.json
Hi @lukechodev,
You do not have to create your own server.json file (no need to mount it in a volume nor any need to copy it in the image). It will be automatically added into the container in $HOME/ when the game server starts.
Here is the documentation about using container builds: Container builds (unity.com)
and here is the documentation about the server.json more specifically: Server.json (unity.com)
We reviewed the parts about server.json and its location in those pages and we understand where your confusion comes from. A task has been added for us to clarify it.
Thanks arthur.
Yes i confused when i read bottom of the document
https://docs.unity.com/ugs/en-us/manual/game-server-hosting/manual/concepts/container-builds
" If you create a container build from scratch, create your own server.json file and include it in the container image. Refer to Server.json for the format of this file, and Configuration variables for an explanation of server.json 's variables."
it seemed like I had to create my own Server.json and write the code to assign it when building a container image to create a server.