About Small Scale Competitive Multiplayer Template
This template provides a starting point to create and ship your Multiplayer project using Netcode For GameObjects and Unity Gaming Services.
The template includes a Bootstrapper tool that helps you test faster using various network modes (Host, Client, Server) and dynamic configurations, in-editor tutorials, and a barebone event-driven gameplay flow.
Using Small Scale Competitive Multiplayer Template
To get started:
- Check that your project meets the technical requirements below first.
- Open the project and follow the instructions provided by the Welcome Dialog. It will guide you through the in-editor tutorials.
If you prefer to explore the project on your own:
- Open the MetagameScene
- Go to Multiplayer > Bootstrapper
- Adjust the value of each field of the Bootstrapper according to what you want to test
- Enter Play Mode
Remember that you can access tutorials and useful resources at any time from the Tutorials > Show tutorials menu.
Technical details
Requirements
This version of Small Scale Competitive Multiplayer Template is compatible with the following versions of the Unity Editor:
- 2022.3 and later (recommended)
In order to use the Unity Gaming Services (UGS) bundled with the template, you'll also need to:
- link the project to a project of your organization. Please refer to the official documentation to learn how to do so.
- setup 3 different service environments, named
dev
,staging
andproduction
. Please refer to the Environment Page to learn how to do so. - Enable
Game Server Hosting
in the unity dashboard of your project - Create a new BuildConfiguration for Linux, pick the "none" querytype and use these Launch parameters:
-port $$port$$ -queryport $$query_port$$ -logFile $$log_dir$$/Engine.log -batchmode -nographics
; setminServers
to0
andmaxServers
to4
(this is the amount of matches you can play simultaneously) - Make a Linux build of the game (you can make it from the Multiplayer > Build menu in-project)
- Open the
startupConfiguration.json
file in theBuilds > Server
folder - Set the
StartAsHost
flag asfalse
; and theStartAsServer
astrue
; setMaxPlayers
to2
- In the Unity dashboard, Create a fleet that uses the BuildConfiguration
- Create a matchmaker queue called
Standard
- Create a matchmaker pool and assign the fleet to it
- Create 2 teams of 1 player in the matchmaker configuration
- Create a test allocation
- Your fleet should now be up and running in a few minutes
You can later on change the configuration, parameters and queues based on your needs.
The template is already configured to make UGS authentication work properly when testing using 2 editors through the ParrelSync package, but such package is not included by default as it is not officially supported by Unity. Please refer to this page to learn more about ParrelSync.
Known limitations
The Small Scale Competitive Multiplayer Template version 1.0.0 has the following limitations:
- The Bootstrapper tool is not available in standalone players.
- WebSocket is not supported by 'Unity Transport' package version 1.3.4. You need to update that package to version 2.0.0 or higher, or update 'Netcode For GameObjects' package to a version that depends on 'Unity Transport' 2.0.0 or higher.
Project template contents
The following table indicates the root folder of each type of sample in this project template. Each sample's root folder contains its own folders:
Folder Location | Description |
---|---|
AdditionalBuildFiles |
Root folder containing server and client-specific files that are added to builds at the end of the build process. |
Editor |
Root folder containing in-editor tutorials. |
Prefabs |
Root folder containing the assets of reusable scene objects. |
Resources |
Root folder containing assets that need to be laoded at runtime through the 'Resources' mechanism. |
Scenes |
Root folder containing the scenes of the project. |
Scripts |
Root folder containing code. |
Settings |
Root folder containing project-specific settings. |
UI Toolkit |
Root folder containing UI assets and stylesheets. |
Document revision history
Date | Reason |
---|---|
Sept 19, 2023 | Document created. Matches project template version 1.0. |