Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Assets/Tutorials/NetworkVariables/Scripts/TeamPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ public void SetTeamServerRpc(byte newTeamIndex)
// Update the teamIndex NetworkVariable
teamIndex.Value = newTeamIndex;
}


private void Start()
{
// Apply already connected teams for late joined clients
OnTeamChanged(0,teamIndex.Value);
}

private void OnEnable()
{
// Start listening for the team index being updated
Expand Down