public void SendChatMessage(UnityEngine.UI.InputField inputField) { if (!NetworkStatus.IsClient()) { // this is not client (nor host), so we will send message as server ChatManager.SendChatMessageToAllPlayersAsServer(inputField.text); } else { // there is an active local player ChatManager.SendChatMessageToAllPlayersAsLocalPlayer(inputField.text); } // clear input field inputField.text = ""; }
public static List <string> GetColumnNames() { if (NetworkStatus.IsClient()) { return(new List <string>() { "name", "kills", "deaths", "ping" }); } else if (NetworkStatus.IsServer()) { return(new List <string>() { "name", "kills", "deaths", "ping", "health", "net id", "obj id", "status", "ip" }); } return(null); }
public static List <float> GetColumnWidthPercentages() { List <float> widthPercentages = null; if (NetworkStatus.IsClient()) { widthPercentages = new List <float>() { 0.4f, 0.15f, 0.15f, 0.3f } } ; else if (NetworkStatus.IsServer()) { widthPercentages = new List <float>() { 0.25f, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0.225f, 0.225f } } ; return(widthPercentages); }