void Start() { NetworkManager mng = NetworkManager.singleton; netManager = mng.GetComponent <CustomNetworkManager>(); netManager.RequestMatches(); foreach (string player in netManager.playerNames) { dropdownCharacter.options.Add(new Dropdown.OptionData() { text = player }); } dropdownCharacter.value = 0; dropdownCharacter.RefreshShownValue(); ip.text = "localhost"; port.text = "7777"; }
// Online public void OnRefreshButton() { netManager.RequestMatches(); dropdownMatches.ClearOptions(); }