morsh / unity-drones-multiplayer

Enable multiple players to connect to the same enrironment (UNET), fly a drone, and watch others fly their drones
MIT License
36 stars 26 forks source link
azure docker drones kubernetes unet unity

Unity Drones Multiplayer

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.

Preview

Execution on Windows

You can also execute the server by opening Scenes/server in unity and pressing Play.

Building and Running with Docker

To build the server

Run on Kubernetes on Azure

You can run Building and Running with Docker to create a new image, then run the following commands: (Replace with your docker hub user name)

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.

Resources

License

MIT License