public override void OnStartServer() { //Get player and get teamcolor from player RTSPlayer player = connectionToClient.identity.GetComponent <RTSPlayer>(); teamColor = player.GetTeamColor(); }
public override void OnStartServer() { RTSPlayer player = connectionToClient.identity.GetComponent <RTSPlayer>(); //Debug.Log($"TeamColorSetter {player} , color {player.GetTeamColor()} "); teamColor = player != null?player.GetTeamColor() : Color.red; }
public override void OnStartServer() { //Find Which Player Owns This Object RTSPlayer player = connectionToClient.identity.GetComponent <RTSPlayer>(); //Get Color Belongs To Us teamColor = player.GetTeamColor(); }