Skip to main content

Create tags

Tags are similar to launch arguments for Players (both the main Editor Player and Virtual Players) that you can use to configure Players to do things such as:

  • Run as a client, server, or host automatically
  • Automatically run as a member of a specific team (for example, “Red Team” or “Blue Team”)
  • Move faster or slower to simulate their network connection

Using tags involves the following parts:

  1. Create the tag(s)
  2. Configure the tag(s)
  3. Attach the tag(s) to your Players

Create a tag

To create a tag,

  1. In the Unity Editor, open the MPPM window by navigating to Window > Multiplayer Play Mode.
  2. Select the plus sign plus sign under Player Tags to create your new tag.
  3. Name the tag.
  4. Select Save. Your new tag is automatically added to the VirtualProjectsConfig.json file in the ProjectsSettings folder.
  5. Your new tag should also appear under the Player Tags section of the MPPM window and in the dropdown menu for the Tag option of each Player.

Next Steps

Without configuration, Tags don't do anything. You must target tags in your game scripts with CurrentPlayer.ReadOnlyTags(). Refer to the following tag examples as guides for your own scripts: