// Use this for initialization
        void Start()
        {
            backtoryApi = BacktoryRealtimeUnityApi.Instance();
            backtoryApi.SetChatListener(this);

            addClickListeners();
//			btnOffline.onClick.Invoke ();
        }
        // Use this for initialization
        void Start()
        {
            PlayerPrefs.SetInt("MainLevel", Application.loadedLevel);

            // TODO: adapt to other parts of sdk
            BacktoryRealtimeUnityApi.Initialize(BacktoryConfig.BacktoryConnectivityInstanceId);

            backtoryApi = BacktoryRealtimeUnityApi.Instance();
            backtoryApi.SetRealtimeSdkListener(this);
            backtoryApi.SetMatchmakingListener(this);
            backtoryApi.SetChallengeListener(this);

            ifUsername.text      = "user1";
            ifPassword.inputType = InputField.InputType.Password;
            ifPassword.text      = "a";

            addClickListeners();
        }
        // Use this for initialization
        void Start()
        {
//			UnityThreadHelper.EnsureHelperForce ();

            matchApi = BacktoryRealtimeUnityApi.GetMatchApi(MainScript.LastFoundedGameId);
            matchApi.SetRealtimeSdkListener(this);
            matchApi.SetMatchListener(this);

            addClickListeners();

            // TODO use better name like JoinAndStart or ConnectAndJoin
            BacktoryResponse <ConnectResponse> response = matchApi.ConnectAndJoin();

            if (response.Successful)
            {
                writeLine("---connected: " + response.Body.Username + ":" + response.Body.UserId);
            }
            else
            {
                writeLine("---connect failed with code: " + response.Code + " and message: " + response.Message);
            }
        }