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