void Start()
    {
        uiText = GameObject.Find("Text").GetComponent <Text>();
        DisplayMessage(statusText);

        var signalR = new SignalR();

        signalR.Init(signalRHubURL);

        signalR.On(HANDLER_A, (string payload) =>
        {
            var json = JsonUtility.FromJson <JsonPayload>(payload);
            DisplayMessage($"{HANDLER_A}: {json.message}");
        });
        signalR.On(HANDLER_B, (string payload) =>
        {
            var json = JsonUtility.FromJson <JsonPayload>(payload);
            DisplayMessage($"{HANDLER_B}: {json.message}");
        });

        signalR.ConnectionStarted += (object sender, ConnectionEventArgs e) =>
        {
            Debug.Log($"Connected: {e.ConnectionId}");
            DisplayMessage(connectedText);

            var json1 = new JsonPayload
            {
                message = messageToSendA
            };
            signalR.Invoke(hubMethodA, JsonUtility.ToJson(json1));
            var json2 = new JsonPayload
            {
                message = messageToSendB
            };
            signalR.Invoke(hubMethodB, JsonUtility.ToJson(json2));
        };
        signalR.ConnectionClosed += (object sender, ConnectionEventArgs e) =>
        {
            Debug.Log($"Disconnected: {e.ConnectionId}");
            DisplayMessage(disconnectedText);
        };

        signalR.Connect();
    }
        public static async Task <bool> CreateGameLobby()
        {
            var gameSettings = ModelMapper.Mapper.Map <List <GameSettingDto> >(GameSettings.Values);
            var response     = await HttpHelper.Post <GameLobby, List <GameSettingDto> >("gamelobby", gameSettings);

            if (response.Response.IsSuccessStatusCode)
            {
                DataContainer.GameLobby = response.Result;
                await SignalR.Connect();

                //send request that creater is the lobby owner
                _ = SignalR.Connection.InvokeAsync("AssumeControlOfLobby", DataContainer.GameLobby.Code);

                return(true);
            }


            return(false);
        }