A sample project to use UNET protocol between client and server to allow multiplayer support for Unity by enabling multiple users to connect and control a drone while watching other players interact with their own drones.
File > Build Settings
.Scenes/desert
into ./Build/Desert/start.exe
.Scenes/server
into ./Build/Server/start.exe
.Server/start.exe
Desert/start.exe
multiple timesYou can also execute the server by opening Scenes/server
in unity and pressing Play
.
File > Build Settings
.Scenes/desert
into ./Build/Desert/start.exe
.Desert/start.exe
multiple timesTo build the server
File > Build Settings
.Linux
+ x86 + x86_x64 (Universal)
+ Headless Mode: true
.Player Settings
and set Scripting Define Symbols
to CROSS_PLATFORM_INPUT;DEDICATED_SERVER_MODE
.Scenes/server
into ./Build/Server/Linux/linuxserver.x86
.docker build -t unitydronesserver:latest .
docker run -p 5701:5701/udp unitydronesserver:latest
docker ps -a
You can run Building and Running with Docker to create a new image, then run the following commands:
(Replace
docker tag unitydronesserver:latest <USER_NAME>/unitydronesserver:latest
docker push <USER_NAME>/unitydronesserver:latest
Follow instructions to setup a new kubernetes cluster on Azure under: k8s/setup.sh.
Deploy a new application using:
kubectl create -f k8s/app.yaml
If you want to use your own image, change k8s/app.yaml and replace morshemesh with your own user name.
server_ip
under Assets/Scripts/Client.cs
.MIT License