浏览代码

fixing issue causing blank IPs to not work

/main
David Woodruff 4 年前
当前提交
79a7841c
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 7
      Assets/Scripts/Client/UI/MainMenuUI.cs

7
Assets/Scripts/Client/UI/MainMenuUI.cs


public GameObject GameHubGO;
private BossRoom.GameNetHub m_netHub;
private string m_defaultIPText;
//track what this is on startup. We're not opinionated; we will try whatever the user puts in, as long as they've changed the text.
m_defaultIPText = GameObject.Find("IPInputBox").GetComponent<UnityEngine.UI.Text>().text;
}
// Update is called once per frame

private string GetIPAddress()
{
string iptext = GameObject.Find("IPInputText").GetComponent<UnityEngine.UI.Text>().text;
if( iptext == m_defaultIPText )
if( iptext == "" )
{
return "127.0.0.1";
}

正在加载...
取消
保存