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,
Create a Player Tag
To create a Player Tag,
- In the Unity Editor, open the Multiplayer Play Mode window by navigating to Window > Multiplayer Play Mode.
- Select the plus sign under Player Tags to create your new tag.
- Name the Player Tag.
- Select Save. Your new tag is automatically added to the
VirtualProjectsConfig.jsonfile in the
- Your new tag should also appear under the Player Tags section of the Multiplayer Play Mode window and in the dropdown menu for the Tag option of each Player.
Without configuration, Player Tags don't do anything. You must target Player Tags in your game scripts with
CurrentPlayer.ReadOnlyTags(). See the following Player Tag examples as guides for your own scripts: