Skip to main content

Create Player Tags

Player 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 Player Tags involves 3 parts,

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

Create a Player Tag

To create a Player 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 Player 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, Player Tags don't do anything. You must target Player Tags in your game scripts with CurrentPlayer.Tag. See the following Player Tag examples as guides for your own scripts: