|
@ -30,7 +30,7 @@ public class HomeScreenManager : MonoBehaviour { |
|
|
bool Succeeded = int.TryParse(Port.text, out intVal); |
|
|
bool Succeeded = int.TryParse(Port.text, out intVal); |
|
|
if (Succeeded) |
|
|
if (Succeeded) |
|
|
{ |
|
|
{ |
|
|
Destroy(ServerManager.Instance.gameObject); |
|
|
|
|
|
|
|
|
//Destroy(ServerManager.Instance.gameObject);
|
|
|
ClientManager.Instance.StartClient(IP.text, intVal); |
|
|
ClientManager.Instance.StartClient(IP.text, intVal); |
|
|
} |
|
|
} |
|
|
PlayerPrefs.SetString("IP", IP.text); |
|
|
PlayerPrefs.SetString("IP", IP.text); |
|
@ -54,13 +54,13 @@ public class HomeScreenManager : MonoBehaviour { |
|
|
Server.SetActive(false); |
|
|
Server.SetActive(false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
IP.text = "127.0.0.1"; |
|
|
|
|
|
|
|
|
IP.text = IPGrabber.GetIP(ADDRESSFAM.IPv4); |
|
|
|
|
|
|
|
|
PlayerPrefs.SetString("PORT", Port.text); |
|
|
PlayerPrefs.SetString("PORT", Port.text); |
|
|
PlayerPrefs.SetString("NAME", Name.text); |
|
|
PlayerPrefs.SetString("NAME", Name.text); |
|
|
PlayerPrefs.SetString("IP", IP.text); |
|
|
PlayerPrefs.SetString("IP", IP.text); |
|
|
|
|
|
|
|
|
Connect(); |
|
|
|
|
|
|
|
|
//Connect();
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void ChangeName() |
|
|
public void ChangeName() |
|
|