using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TestButton : MonoBehaviour { public test test; public Button chooseroadBtn; public Button joinroomBtn; // Start is called before the first frame update void Start() { joinroomBtn.onClick.AddListener(JoinRoom); chooseroadBtn.onClick.AddListener(ChooseRoad); } public void JoinRoom() { //test.JoinRoom(); test.CreateNpcHandler(); joinroomBtn.gameObject.SetActive(false); } public void ChooseRoad() { test.NpcMove(); chooseroadBtn.gameObject.SetActive(false); } // Update is called once per frame void Update() { } }