示例#1
0
    private void Start()
    {
        GameObject lobbyCanvasObj = CanvasManager.Instance.LobbyCanvas.gameObject;

        if (lobbyCanvasObj == null)
        {
            return;
        }

        LobbyCanvas lobbyCanvas = lobbyCanvasObj.GetComponent <LobbyCanvas>();

        GetComponent <Button>().onClick.AddListener(() => lobbyCanvas.OnClickRoom(RoomNameText.text));
    }