mirror of
				https://github.com/DerTyp7/defrain-shooter-unity.git
				synced 2025-10-31 13:37:08 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			428 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			428 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Mirror;
 | |
| using UnityEngine;
 | |
| using UnityEngine.UI;
 | |
| using TMPro;
 | |
| 
 | |
| public class JoinBtnScript : MonoBehaviour
 | |
| {
 | |
|     [SerializeField] private TMP_InputField inputIp;
 | |
|     [SerializeField] private TMP_InputField inputUsername;
 | |
| 
 | |
|     private void Start()
 | |
|     {
 | |
|         gameObject.GetComponent<Button>().onClick.AddListener(JoinServer);
 | |
|     }
 | |
| 
 | |
|     public void JoinServer()
 | |
|     {
 | |
|         NetworkClient.Connect(inputIp.text);
 | |
|     }
 | |
| }
 | 
