Skip to main content

Getting Started

In the further course of this documentation and especially in network-related chapters, you will find additional window tabs for Netcode. These are specifically directed at implementation details of the networking solution.

I'm a Unity Netcode tab!

Playing the Game

Open the Intro scene, and press the Play button! It throws the player directly the Lobby scene, where when using the Online mode (default), they are already connected and authenticated with Unity Gaming Services.

Host a game, ready up and start the game. Since it is a bit boring to play alone, make your lobby public or join it via the displayed join code in a second build!

Overview of Network approaches

For quick access, you can find a list of different network approaches used for a specific aspect or demonstration purposes in the table below.

tip

If you are unexperienced with networking or trying to get familiar with the asset in general, I would recommend not using the direct links below, but going over the sections in the sidebar from top to bottom one by one.

Network TechniqueUse CaseSection
Network VariablesSynchronizing single values between clients.Lobby Map
Remote Procedure CallsExecuting methods on the server or clients.Tower Placement
Network ListsSynchronizing lists of simple data values between clients.Game Manager
Network StructsManaging a single persistent entry per player, in an array of serialized values, and informing all clients about it.PlayerStruct

Maps

This asset features two playable maps: Map1 and Map2. Each map has a unique set of features as detailed below.

Map1

  • 1 defense point
  • 8 paths, overlapping
  • players can place towers everywhere
  • players can help defend each other
  • units spawn on all paths

Map2

  • one defense point per player
  • 8 paths, not overlapping
  • players can place towers on their spawn
  • each player has their own path to defend
  • units spawn where a player was spawned