Example #1
0
    //当游戏大厅面板启用时调用,初始化信息
    void OnEnable()
    {
        m_LobbyMatchListCallResult = CallResult <LobbyMatchList_t> .Create(OnLobbyMatchList);

        m_LobbyMatchListCallResult.Set(SteamMatchmaking.RequestLobbyList());
        currentPageNumber = 1;              //初始化当前房间页
        maxPageNumber     = 1;              //初始化最大房间页

        //获取房间信息面板
        RectTransform rectTransform = roomMessagePanel.GetComponent <RectTransform>();

        roomPerPage = rectTransform.childCount;     //获取房间信息面板的条目数

        //初始化每条房间信息条目
        roomMessage = new GameObject[roomPerPage];
        for (int i = 0; i < roomPerPage; i++)
        {
            roomMessage[i] = rectTransform.GetChild(i).gameObject;
            roomMessage[i].SetActive(false);            //禁用房间信息条目
        }
        ButtonControl();
        if (AutoCreateToggle.isOn)
        {
            ClickJoinOrCreateButton();
        }
    }
        public static Task <GameServer[]> LoadLobbies(string gameVariant = null, string indicator = null)
        {
            lock (LOCK)
            {
                SteamApiHelper.CancelApiCall <LobbyMatchList_t>();

                SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide);

                if (indicator != null)
                {
                    SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.THUNDERHAWK_INDICATOR, indicator, ELobbyComparison.k_ELobbyComparisonEqual);
                }

                if (gameVariant != null)
                {
                    SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.GAME_VARIANT, gameVariant, ELobbyComparison.k_ELobbyComparisonEqual);
                }

                return(SteamApiHelper.HandleApiCall <GameServer[], LobbyMatchList_t>(SteamMatchmaking.RequestLobbyList(), CancellationToken.None,
                                                                                     (tcs, result, bIOFailure) =>
                {
                    if (bIOFailure)
                    {
                        return;
                    }

                    Console.WriteLine("Лобби найдено " + result.m_nLobbiesMatching);

                    tcs.SetResult(HandleGameLobbies(result));
                }));
            }
        }
Example #3
0
        public void FindMatch()
        {
            SteamMatchmaking.AddRequestLobbyListStringFilter("game", GAME_ID, ELobbyComparison.k_ELobbyComparisonEqual);
            var call = SteamMatchmaking.RequestLobbyList();

            m_LobbyMatchList.Set(call, OnLobbyMatchList);
        }
Example #4
0
 public void FindLobbies()
 {
     // SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList()
     SteamMatchmaking.RequestLobbyList();
     searching = true;
     lobbies.Clear();
 }
 public void FindMatch()
 {
     ToggleMenu();
     awaitMsg.text = "Finding Match...";
     awaitMsg.gameObject.SetActive(true);
     SteamMatchmaking.RequestLobbyList();
 }
        public static Task <GameServer[]> LoadLobbies()
        {
            lock (LOCK)
            {
                SteamApiHelper.CancelApiCall <LobbyMatchList_t>();

                SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide);
                SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.STEAM_SPY_INDICATOR, SteamConstants.INDICATOR, ELobbyComparison.k_ELobbyComparisonEqual);
                SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.GAME_VARIANT, SteamConstants.GameVariant, ELobbyComparison.k_ELobbyComparisonEqual);

                /* SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.LOBBY_TYPE, SteamConstants.LOBBY_TYPE_DEFAULT, ELobbyComparison.k_ELobbyComparisonEqual);
                 * SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.GAME_VERSION, GameConstants.VERSION, ELobbyComparison.k_ELobbyComparisonEqual);
                 * SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.IS_IN_GAME, false.ToString(), ELobbyComparison.k_ELobbyComparisonEqual);
                 * SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.IS_AUTOMATCH, false.ToString(), ELobbyComparison.k_ELobbyComparisonEqual);
                 * SteamMatchmaking.AddRequestLobbyListStringFilter(LobbyDataKeys.IS_DUEL, false.ToString(), ELobbyComparison.k_ELobbyComparisonEqual);*/

                return(SteamApiHelper.HandleApiCall <GameServer[], LobbyMatchList_t>(SteamMatchmaking.RequestLobbyList(), CancellationToken.None,
                                                                                     (tcs, result, bIOFailure) =>
                {
                    if (bIOFailure)
                    {
                        return;
                    }

                    Console.WriteLine("Лобби найдено " + result.m_nLobbiesMatching);

                    tcs.SetResult(HandleGameLobbies(result));
                }));
            }
        }
    // Update is called once per frame
    void OnGUI()
    {
        SteamAPI.RunCallbacks();

        if (GUI.Button(new Rect(120, 20, 140, 20), "Create Lobby"))
        {
            print("Create lobby");
            SteamAPICall_t host = SteamMatchmaking.CreateLobby(ELobbyType.k_ELobbyTypePublic, 4);
        }
        if (GUI.Button(new Rect(120, 20, 280, 20), "lobbies list"))
        {
            print("list lobbies");
            SteamAPICall_t getList = SteamMatchmaking.RequestLobbyList();
        }
        if (GUI.Button(new Rect(120, 20, 420, 20), "change first lobby"))
        {
            print("change first lobby");
            SteamAPICall_t joinLobby = SteamMatchmaking.JoinLobby(SteamMatchmaking.GetLobbyByIndex(0));
        }
        if (GUI.Button(new Rect(120, 20, 560, 20), "Num Players"))
        {
            int numPlayers = SteamMatchmaking.GetNumLobbyMembers((CSteamID)currentID);
            print("Number of players" + numPlayers);
            for (int i = 0; i < numPlayers; i++)
            {
                print("\t Player(" + i + ")==" + SteamFriends.GetFriendPersonaName(SteamMatchmaking.GetLobbyMemberByIndex((CSteamID)currentID, i)));
            }
        }
    }
Example #8
0
        public static void RequestLobbies()
        {
            if (!SteamManager.Initialized)
            {
                Logger.Error("CONNECTION FAILED");
                return;
            }
            Logger.Debug($"Requesting list of all lobbies from steam");

            LobbyData.Clear();
            MultiplayerListing.refreshLobbyList();

            SteamMatchmaking.AddRequestLobbyListFilterSlotsAvailable(1);
            SteamMatchmaking.AddRequestLobbyListStringFilter("version", PACKET_VERSION, ELobbyComparison.k_ELobbyComparisonEqual);
            SteamAPICall_t apiCall = SteamMatchmaking.RequestLobbyList();

            OnLobbyMatchListCallResult.Set(apiCall);

            int cFriends = SteamFriends.GetFriendCount(EFriendFlags.k_EFriendFlagImmediate);

            for (int i = 0; i < cFriends; i++)
            {
                FriendGameInfo_t friendGameInfo;
                CSteamID         steamIDFriend = SteamFriends.GetFriendByIndex(i, EFriendFlags.k_EFriendFlagImmediate); SteamFriends.GetFriendGamePlayed(steamIDFriend, out friendGameInfo);
                if (friendGameInfo.m_gameID == GetGameID() && friendGameInfo.m_steamIDLobby.IsValid())
                {
                    SteamMatchmaking.RequestLobbyData(friendGameInfo.m_steamIDLobby);
                }
            }
        }
    ////////////////////////////////////////////////////
    //lobby list requests
    ////////////////////////////////////////////////////

    /// <summary>
    /// Requests the lobby list.
    /// </summary>
    public void RequestLobbyList()
    {
        SteamAPICall_t handle = SteamMatchmaking.RequestLobbyList();

        OnLobbyMatchListCallResult.Set(handle);
        //Debug.Log("SteamMatchmaking.RequestLobbyList() : " + handle);
    }
    // Token: 0x0600096E RID: 2414 RVA: 0x00045600 File Offset: 0x00043800
    private void RequestPublicLobbies()
    {
        SteamAPICall_t hAPICall = SteamMatchmaking.RequestLobbyList();

        this.m_lobbyMatchList.Set(hAPICall, null);
        this.m_refreshingPublicGames = true;
    }
Example #11
0
        private void RequestLobbies()
        {
            lobbyRequestBtn.Enabled   = false;
            lobbyRequestTimer.Enabled = false;

            stats.RequestLobbyListCount++;
            SteamMatchmaking.RequestLobbyList();
        }
Example #12
0
 public static void QueryList(bool friendsOnly)
 {
     CoopLobbyManager.Initialize();
     CoopLobbyManager.LobbyMatchList_Result = (from x in CoopLobbyManager.LobbyMatchList_Result
                                               where x.IsOwner
                                               select x).ToList <CoopLobbyInfo>();
     SteamMatchmaking.AddRequestLobbyListResultCountFilter(100);
     SteamMatchmaking.RequestLobbyList();
 }
Example #13
0
    public void SearchLobby()
    {
        if (!enterLobby)
        {
            enterLobby = true;

            SteamAPICall_t requestLobbyList = SteamMatchmaking.RequestLobbyList();
            SteamCallbackReceiver.Set <LobbyMatchList_t>(requestLobbyList);
        }
    }
Example #14
0
 public void JoinGame()
 {
     if (lobby.Equals(CSteamID.Nil) == false)
     {
         Debug.LogError("Trying to join a game when already connected! This won't work.");
         return;
     }
     //First, we need the UI to show the player the available lobbies.
     Debug.Log("Requesting lobbies...");
     m_GotLobbyList.Set(SteamMatchmaking.RequestLobbyList());
 }
Example #15
0
 public unsafe static void SearchForLobbyWorldwide()
 {
     if (!_initialized)
     {
         return;
     }
     lobbySearchResult   = null;
     lobbySearchComplete = false;
     lobbiesFound        = 0;
     SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide);
     SetCallResult <LobbyMatchList_t>(SteamMatchmaking.RequestLobbyList());
 }
Example #16
0
        public static void FindLobbies(Action <bool> OnFind)
        {
            s_OnFindLobbies       = OnFind;
            s_nLobbiesFound       = 0;
            s_nFriendLobbiesFound = 0;

            InteropHelp.TestIfAvailableClient();

            var hSteamAPICall = SteamMatchmaking.RequestLobbyList();

            g_CallResultLobbyMatchList = new CallResult <LobbyMatchList_t>(CallbackClass.instance.OnFindLobbies);
            g_CallResultLobbyMatchList.Set(hSteamAPICall);
        }
Example #17
0
    public void StartFinding()
    {
        if (!SteamManager.Initialized)
        {
            return;
        }
        IsFinding = true;

        // This filters were lobbies with correct gamemodes this is required before RequestLobbyList
        SteamMatchmaking.AddRequestLobbyListStringFilter("Gamemode", "Ballers-1v1", ELobbyComparison.k_ELobbyComparisonEqual);
        SteamAPICall_t result = SteamMatchmaking.RequestLobbyList();

        m_CallResultLobbyMatchList.Set(result, OnLobbyMatchList);
    }
Example #18
0
    // FOR TESTING
    private IEnumerator Test()
    {
        //test if lobby is created and leaves lobby (destroys on steams end)
        yield return(new WaitForSeconds(3.0f));

        SteamMatchmaking.AddRequestLobbyListStringFilter("Gamemode", "Ballers-1v1", ELobbyComparison.k_ELobbyComparisonEqual);
        SteamAPICall_t result = SteamMatchmaking.RequestLobbyList();

        m_CallResultLobbyMatchList.Set(result, OnLobbyMatchListTest);
        yield return(new WaitForSeconds(1.0f));

        print("leaving lobby...");
        SteamMatchmaking.LeaveLobby(m_lobbyID);
        m_lobbyID = CSteamID.Nil;
    }
Example #19
0
        public static void RequestLobbies()
        {
            if (!SteamManager.Initialized)
            {
                Logger.Error("CONNECTION FAILED");
                return;
            }
            Logger.Debug($"Requesting list of all lobbies from steam");

            SteamMatchmaking.AddRequestLobbyListFilterSlotsAvailable(1);
            SteamMatchmaking.AddRequestLobbyListStringFilter("version", PACKET_VERSION, ELobbyComparison.k_ELobbyComparisonEqual);
            SteamAPICall_t apiCall = SteamMatchmaking.RequestLobbyList();

            OnLobbyMatchListCallResult.Set(apiCall);
        }
Example #20
0
    public void FindMatch()
    {
        if (!SteamManager.Initialized)
        {
            lobbyConnectionState = SessionConnectionState.FAILED;
            return;
        }

        lobbyConnectionState = SessionConnectionState.CONNECTING;

        //Note: call SteamMatchmaking.AddRequestLobbyList* before RequestLobbyList to filter results by some criteria
        SteamMatchmaking.AddRequestLobbyListStringFilter("game", GAME_ID, ELobbyComparison.k_ELobbyComparisonEqual);
        var call = SteamMatchmaking.RequestLobbyList();

        m_LobbyMatchList.Set(call, OnLobbyMatchList);
    }
Example #21
0
 public unsafe static void SearchForLobby(User who)
 {
     if (!_initialized)
     {
         return;
     }
     lobbySearchResult   = null;
     lobbySearchComplete = false;
     lobbiesFound        = 0;
     if (who != null)
     {
         // TODO: What does the original Steam.dll do? Filter by user?
         // This isn't critical, but only used when Duck Game's Program.testServer == true and superjoebob is your steam friend.
     }
     SetCallResult <LobbyMatchList_t>(SteamMatchmaking.RequestLobbyList());
 }
Example #22
0
        public async Task <IEnumerable <LobbyInfo> > GetLobbies()
        {
            if (!SteamManager.Initialized)
            {
                return(Enumerable.Empty <LobbyInfo>());
            }
            var lobbyList = await SteamMatchmaking.RequestLobbyList().ToTask <LobbyMatchList_t>();

            lobbies.Clear();
            for (var i = 0; i < lobbyList.m_nLobbiesMatching; i++)
            {
                var id = SteamMatchmaking.GetLobbyByIndex(i);
                lobbies.Add(CreateLobbyInfo(id));
            }
            return(lobbies);
        }
Example #23
0
            private void SearchForLobby()
            {
                SteamMatchmaking.CreateLobby(ELobbyType.k_ELobbyTypeFriendsOnly, 10);

                Callback <LobbyCreated_t> .Create(cb =>
                {
                    Console.WriteLine("ciaone");
                });

                SteamMatchmaking.RequestLobbyList();

                Callback <LobbyMatchList_t> .Create(x =>
                {
                    Console.WriteLine(x.m_nLobbiesMatching);
                });
            }
        public async Task <IList <Lobby> > SearchLobbies(Action <ILobbySearchBuilder> builder = null)
        {
            var queryBuilder = new LobbySearchBuilder();

            builder?.Invoke(queryBuilder);
            var list = await SteamMatchmaking.RequestLobbyList().ToTask <LobbyMatchList_t>();

            var results = new Lobby[list.m_nLobbiesMatching];

            for (var i = 0; i < list.m_nLobbiesMatching; i++)
            {
                var lobbyId = SteamMatchmaking.GetLobbyByIndex(i);
                if (!lobbyId.IsValid())
                {
                    continue;
                }
                results[i] = new SteamLobby(lobbyId, this);
            }
            return(results);
        }
Example #25
0
        /// <summary>
        /// Get all available lobbies for this game.
        /// </summary>
        private void GetAvailableLobbyList()
        {
            if (SteamManager.Initialized)
            {
                if (!onlyShowFriendsGames)
                {
                    // Get servers from everywhere change it to ELobbyDistanceFilter.Default to get only near servers
                    SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide);
                    // Only get games that have our id
                    SteamMatchmaking.AddRequestLobbyListStringFilter("fnr_gameId", mpMenu.gameId,
                                                                     ELobbyComparison.k_ELobbyComparisonEqual);
                    // Uncomment this if the default count of 50 is not enough.
                    //SteamMatchmaking.AddRequestLobbyListResultCountFilter(100);

                    // Request list of lobbies based on above filters from Steam
                    SteamMatchmaking.RequestLobbyList();
                }
                else
                {
                    GetFriendGamesList();
                }
            }
        }
Example #26
0
    void Update()
    {
        SteamAPI.RunCallbacks();

        // Command - Create new lobby
        if (Input.GetKeyDown(KeyCode.C))
        {
            Debug.Log("Trying to create lobby ...");
            SteamAPICall_t try_toHost = SteamMatchmaking.CreateLobby(ELobbyType.k_ELobbyTypePublic, 8);
        }

        // Command - List lobbies
        if (Input.GetKeyDown(KeyCode.L))
        {
            Debug.Log("Trying to get list of available lobbies ...");
            SteamAPICall_t try_getList = SteamMatchmaking.RequestLobbyList();
        }

        // Command - Join lobby at index 0 (testing purposes)
        if (Input.GetKeyDown(KeyCode.J))
        {
            Debug.Log("Trying to join FIRST listed lobby ...");
            SteamAPICall_t try_joinLobby = SteamMatchmaking.JoinLobby(SteamMatchmaking.GetLobbyByIndex(0));
        }

        // Command - List lobby members
        if (Input.GetKeyDown(KeyCode.Q))
        {
            int numPlayers = SteamMatchmaking.GetNumLobbyMembers((CSteamID)current_lobbyID);

            Debug.Log("\t Number of players currently in lobby : " + numPlayers);
            for (int i = 0; i < numPlayers; i++)
            {
                Debug.Log("\t Player(" + i + ") == " + SteamFriends.GetFriendPersonaName(SteamMatchmaking.GetLobbyMemberByIndex((CSteamID)current_lobbyID, i)));
            }
        }
    }
Example #27
0
        internal static void OpenServerBrowser()
        {
            SteamAPICall_t handle = SteamMatchmaking.RequestLobbyList();

            callr.Set(handle);
        }
 public void Refresh()
 {
     m_LobbyMatchListCallResult.Set(SteamMatchmaking.RequestLobbyList());
 }
Example #29
0
        // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
        private static void Main(string[] args)
        {
            Environment.SetEnvironmentVariable("SteamAppId", "212480");
            Callback <LobbyMatchList_t> .Create(new Callback <LobbyMatchList_t> .DispatchDelegate(Program.OnGetLobbiesList));

            Callback <LobbyEnter_t> .Create(new Callback <LobbyEnter_t> .DispatchDelegate(Program.OnLobbyEnter));

            if (SteamAPI.Init())
            {
                if (args.Length != 0)
                {
                    string a = args[0];
                    if (!(a == "lobbylist"))
                    {
                        if (!(a == "playerlist"))
                        {
                            if (!(a == "friendlist"))
                            {
                                if (!(a == "migratehost"))
                                {
                                    if (!(a == "setplayerlimit"))
                                    {
                                        Program.finished = true;
                                    }
                                    else
                                    {
                                        SteamMatchmaking.SetLobbyMemberLimit((CSteamID)Convert.ToUInt64(args[1]), Convert.ToInt32(args[2]));
                                        Program.finished = true;
                                    }
                                }
                                else
                                {
                                    SteamMatchmaking.SetLobbyOwner((CSteamID)Convert.ToUInt64(args[1]), (CSteamID)Convert.ToUInt64(args[2]));
                                    Program.finished = true;
                                }
                            }
                            else
                            {
                                Program.GetFriendList();
                            }
                        }
                        else
                        {
                            SteamMatchmaking.JoinLobby((CSteamID)Convert.ToUInt64(args[1]));
                        }
                    }
                    else
                    {
                        SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide);
                        SteamMatchmaking.RequestLobbyList();
                    }
                }
                else
                {
                    Program.finished = true;
                }
                Program._Timer.Elapsed += Program.TimeOut;
                Program._Timer.Start();
                while (!Program.finished && !Program.timedOut)
                {
                    SteamAPI.RunCallbacks();
                }
                if (Program.timedOut)
                {
                    Console.WriteLine("-2");
                }
                SteamAPI.Shutdown();
                return;
            }
            Console.WriteLine("-1");
        }
Example #30
0
    public void RenderOnGUI()
    {
        GUILayout.BeginArea(new Rect(Screen.width - 200, 0, 200, Screen.height));
        GUILayout.Label("Variables:");
        GUILayout.Label("m_Lobby: " + m_Lobby);
        GUILayout.EndArea();

        GUILayout.BeginVertical("box");
        m_ScrollPos = GUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(Screen.width - 215), GUILayout.Height(Screen.height - 33));

        GUILayout.Label("GetFavoriteGameCount() : " + SteamMatchmaking.GetFavoriteGameCount());

        {
            AppId_t AppID;
            uint    IP;
            ushort  ConnPort;
            ushort  QueryPort;
            uint    Flags;
            uint    LastPlayedOnServer;
            bool    ret = SteamMatchmaking.GetFavoriteGame(0, out AppID, out IP, out ConnPort, out QueryPort, out Flags, out LastPlayedOnServer);
            GUILayout.Label("GetFavoriteGame(0, out AppID, out IP, out ConnPort, out QueryPort, out Flags, out LastPlayedOnServer) : " + ret + " -- " + AppID + " -- " + IP + " -- " + ConnPort + " -- " + QueryPort + " -- " + Flags + " -- " + LastPlayedOnServer);
        }

        if (GUILayout.Button("AddFavoriteGame(TestConstants.Instance.k_AppId_TeamFortress2, TestConstants.k_IpAddress208_78_165_233_uint, TestConstants.k_Port27015, TestConstants.k_Port27015, Constants.k_unFavoriteFlagFavorite, CurrentUnixTime)"))
        {
            uint CurrentUnixTime = (uint)(System.DateTime.UtcNow.Subtract(new System.DateTime(1970, 1, 1))).TotalSeconds;
            int  ret             = SteamMatchmaking.AddFavoriteGame(TestConstants.Instance.k_AppId_TeamFortress2, TestConstants.k_IpAddress208_78_165_233_uint, TestConstants.k_Port27015, TestConstants.k_Port27015, Constants.k_unFavoriteFlagFavorite, CurrentUnixTime);
            print("SteamMatchmaking.AddFavoriteGame(" + TestConstants.Instance.k_AppId_TeamFortress2 + ", " + TestConstants.k_IpAddress208_78_165_233_uint + ", " + TestConstants.k_Port27015 + ", " + TestConstants.k_Port27015 + ", " + Constants.k_unFavoriteFlagFavorite + ", " + CurrentUnixTime + ") : " + ret);
        }

        if (GUILayout.Button("RemoveFavoriteGame(TestConstants.Instance.k_AppId_TeamFortress2, TestConstants.k_IpAddress208_78_165_233_uint, TestConstants.k_Port27015, TestConstants.k_Port27015, Constants.k_unFavoriteFlagFavorite)"))
        {
            bool ret = SteamMatchmaking.RemoveFavoriteGame(TestConstants.Instance.k_AppId_TeamFortress2, TestConstants.k_IpAddress208_78_165_233_uint, TestConstants.k_Port27015, TestConstants.k_Port27015, Constants.k_unFavoriteFlagFavorite);
            print("SteamMatchmaking.RemoveFavoriteGame(" + TestConstants.Instance.k_AppId_TeamFortress2 + ", " + TestConstants.k_IpAddress208_78_165_233_uint + ", " + TestConstants.k_Port27015 + ", " + TestConstants.k_Port27015 + ", " + Constants.k_unFavoriteFlagFavorite + ") : " + ret);
        }

        if (GUILayout.Button("RequestLobbyList()"))
        {
            SteamAPICall_t handle = SteamMatchmaking.RequestLobbyList();
            OnLobbyMatchListCallResult.Set(handle);
            print("SteamMatchmaking.RequestLobbyList() : " + handle);
        }

        if (GUILayout.Button("AddRequestLobbyListStringFilter(\"SomeStringKey\", \"SomeValue\", ELobbyComparison.k_ELobbyComparisonNotEqual)"))
        {
            SteamMatchmaking.AddRequestLobbyListStringFilter("SomeStringKey", "SomeValue", ELobbyComparison.k_ELobbyComparisonNotEqual);
            print("SteamMatchmaking.AddRequestLobbyListStringFilter(" + "\"SomeStringKey\"" + ", " + "\"SomeValue\"" + ", " + ELobbyComparison.k_ELobbyComparisonNotEqual + ")");
        }

        if (GUILayout.Button("AddRequestLobbyListNumericalFilter(\"SomeIntKey\", 0, ELobbyComparison.k_ELobbyComparisonNotEqual)"))
        {
            SteamMatchmaking.AddRequestLobbyListNumericalFilter("SomeIntKey", 0, ELobbyComparison.k_ELobbyComparisonNotEqual);
            print("SteamMatchmaking.AddRequestLobbyListNumericalFilter(" + "\"SomeIntKey\"" + ", " + 0 + ", " + ELobbyComparison.k_ELobbyComparisonNotEqual + ")");
        }

        if (GUILayout.Button("AddRequestLobbyListNearValueFilter(\"SomeIntKey\", 0)"))
        {
            SteamMatchmaking.AddRequestLobbyListNearValueFilter("SomeIntKey", 0);
            print("SteamMatchmaking.AddRequestLobbyListNearValueFilter(" + "\"SomeIntKey\"" + ", " + 0 + ")");
        }

        if (GUILayout.Button("AddRequestLobbyListFilterSlotsAvailable(3)"))
        {
            SteamMatchmaking.AddRequestLobbyListFilterSlotsAvailable(3);
            print("SteamMatchmaking.AddRequestLobbyListFilterSlotsAvailable(" + 3 + ")");
        }

        if (GUILayout.Button("AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide)"))
        {
            SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide);
            print("SteamMatchmaking.AddRequestLobbyListDistanceFilter(" + ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide + ")");
        }

        if (GUILayout.Button("AddRequestLobbyListResultCountFilter(1)"))
        {
            SteamMatchmaking.AddRequestLobbyListResultCountFilter(1);
            print("SteamMatchmaking.AddRequestLobbyListResultCountFilter(" + 1 + ")");
        }

        if (GUILayout.Button("AddRequestLobbyListCompatibleMembersFilter((CSteamID)0)"))
        {
            SteamMatchmaking.AddRequestLobbyListCompatibleMembersFilter((CSteamID)0);
            print("SteamMatchmaking.AddRequestLobbyListCompatibleMembersFilter(" + (CSteamID)0 + ")");
        }

        if (GUILayout.Button("GetLobbyByIndex(0)"))
        {
            m_Lobby = SteamMatchmaking.GetLobbyByIndex(0);
            print("SteamMatchmaking.GetLobbyByIndex(" + 0 + ") : " + m_Lobby);
        }

        if (GUILayout.Button("CreateLobby(ELobbyType.k_ELobbyTypePublic, 1)"))
        {
            SteamAPICall_t handle = SteamMatchmaking.CreateLobby(ELobbyType.k_ELobbyTypePublic, 1);
            OnLobbyCreatedCallResult.Set(handle);
            print("SteamMatchmaking.CreateLobby(" + ELobbyType.k_ELobbyTypePublic + ", " + 1 + ") : " + handle);
        }

        if (GUILayout.Button("JoinLobby(m_Lobby)"))
        {
            SteamAPICall_t handle = SteamMatchmaking.JoinLobby(m_Lobby);
            OnLobbyEnterCallResult.Set(handle);
            print("SteamMatchmaking.JoinLobby(" + m_Lobby + ") : " + handle);
        }

        if (GUILayout.Button("LeaveLobby(m_Lobby)"))
        {
            SteamMatchmaking.LeaveLobby(m_Lobby);
            m_Lobby = CSteamID.Nil;
            print("SteamMatchmaking.LeaveLobby(" + m_Lobby + ")");
        }

        if (GUILayout.Button("InviteUserToLobby(m_Lobby, SteamUser.GetSteamID())"))
        {
            bool ret = SteamMatchmaking.InviteUserToLobby(m_Lobby, SteamUser.GetSteamID());
            print("SteamMatchmaking.InviteUserToLobby(" + m_Lobby + ", " + SteamUser.GetSteamID() + ") : " + ret);
        }

        GUILayout.Label("GetNumLobbyMembers(m_Lobby) : " + SteamMatchmaking.GetNumLobbyMembers(m_Lobby));

        GUILayout.Label("GetLobbyMemberByIndex(m_Lobby, 0) : " + SteamMatchmaking.GetLobbyMemberByIndex(m_Lobby, 0));

        GUILayout.Label("GetLobbyData(m_Lobby, \"name\") : " + SteamMatchmaking.GetLobbyData(m_Lobby, "name"));

        if (GUILayout.Button("SetLobbyData(m_Lobby, \"name\", \"Test Lobby!\")"))
        {
            bool ret = SteamMatchmaking.SetLobbyData(m_Lobby, "name", "Test Lobby!");
            print("SteamMatchmaking.SetLobbyData(" + m_Lobby + ", " + "\"name\"" + ", " + "\"Test Lobby!\"" + ") : " + ret);
        }

        GUILayout.Label("GetLobbyDataCount(m_Lobby) : " + SteamMatchmaking.GetLobbyDataCount(m_Lobby));

        {
            string Key;
            string Value;
            bool   ret = SteamMatchmaking.GetLobbyDataByIndex(m_Lobby, 0, out Key, 255, out Value, 255);
            GUILayout.Label("GetLobbyDataByIndex(m_Lobby, 0, out Key, 255, out Value, 255) : " + ret + " -- " + Key + " -- " + Value);
        }

        if (GUILayout.Button("DeleteLobbyData(m_Lobby, \"name\")"))
        {
            bool ret = SteamMatchmaking.DeleteLobbyData(m_Lobby, "name");
            print("SteamMatchmaking.DeleteLobbyData(" + m_Lobby + ", " + "\"name\"" + ") : " + ret);
        }

        GUILayout.Label("GetLobbyMemberData(m_Lobby, SteamUser.GetSteamID(), \"test\") : " + SteamMatchmaking.GetLobbyMemberData(m_Lobby, SteamUser.GetSteamID(), "test"));

        if (GUILayout.Button("SetLobbyMemberData(m_Lobby, \"test\", \"This is a test Key!\")"))
        {
            SteamMatchmaking.SetLobbyMemberData(m_Lobby, "test", "This is a test Key!");
            print("SteamMatchmaking.SetLobbyMemberData(" + m_Lobby + ", " + "\"test\"" + ", " + "\"This is a test Key!\"" + ")");
        }

        if (GUILayout.Button("SendLobbyChatMsg(m_Lobby, MsgBody, MsgBody.Length)"))
        {
            byte[] MsgBody = System.Text.Encoding.UTF8.GetBytes("Test Message!");
            bool   ret     = SteamMatchmaking.SendLobbyChatMsg(m_Lobby, MsgBody, MsgBody.Length);
            print("SteamMatchmaking.SendLobbyChatMsg(" + m_Lobby + ", " + MsgBody + ", " + MsgBody.Length + ") : " + ret);
        }

        //SteamMatchmaking.GetLobbyChatEntry() // Only called from within OnLobbyChatMsg!

        if (GUILayout.Button("RequestLobbyData(m_Lobby)"))
        {
            bool ret = SteamMatchmaking.RequestLobbyData(m_Lobby);
            print("SteamMatchmaking.RequestLobbyData(" + m_Lobby + ") : " + ret);
        }

        if (GUILayout.Button("SetLobbyGameServer(m_Lobby, TestConstants.k_IpAddress127_0_0_1_uint, TestConstants.k_Port27015, CSteamID.NonSteamGS)"))
        {
            SteamMatchmaking.SetLobbyGameServer(m_Lobby, TestConstants.k_IpAddress127_0_0_1_uint, TestConstants.k_Port27015, CSteamID.NonSteamGS);
            print("SteamMatchmaking.SetLobbyGameServer(" + m_Lobby + ", " + TestConstants.k_IpAddress127_0_0_1_uint + ", " + TestConstants.k_Port27015 + ", " + CSteamID.NonSteamGS + ")");
        }

        {
            uint     GameServerIP;
            ushort   GameServerPort;
            CSteamID SteamIDGameServer;
            bool     ret = SteamMatchmaking.GetLobbyGameServer(m_Lobby, out GameServerIP, out GameServerPort, out SteamIDGameServer);
            GUILayout.Label("GetLobbyGameServer(m_Lobby, out GameServerIP, out GameServerPort, out SteamIDGameServer) : " + ret + " -- " + GameServerIP + " -- " + GameServerPort + " -- " + SteamIDGameServer);
        }

        if (GUILayout.Button("SetLobbyMemberLimit(m_Lobby, 6)"))
        {
            bool ret = SteamMatchmaking.SetLobbyMemberLimit(m_Lobby, 6);
            print("SteamMatchmaking.SetLobbyMemberLimit(" + m_Lobby + ", " + 6 + ") : " + ret);
        }

        GUILayout.Label("GetLobbyMemberLimit(m_Lobby) : " + SteamMatchmaking.GetLobbyMemberLimit(m_Lobby));

        if (GUILayout.Button("SetLobbyType(m_Lobby, ELobbyType.k_ELobbyTypePublic)"))
        {
            bool ret = SteamMatchmaking.SetLobbyType(m_Lobby, ELobbyType.k_ELobbyTypePublic);
            print("SteamMatchmaking.SetLobbyType(" + m_Lobby + ", " + ELobbyType.k_ELobbyTypePublic + ") : " + ret);
        }

        if (GUILayout.Button("SetLobbyJoinable(m_Lobby, true)"))
        {
            bool ret = SteamMatchmaking.SetLobbyJoinable(m_Lobby, true);
            print("SteamMatchmaking.SetLobbyJoinable(" + m_Lobby + ", " + true + ") : " + ret);
        }

        if (GUILayout.Button("GetLobbyOwner(m_Lobby)"))
        {
            CSteamID ret = SteamMatchmaking.GetLobbyOwner(m_Lobby);
            print("SteamMatchmaking.GetLobbyOwner(" + m_Lobby + ") : " + ret);
        }

        if (GUILayout.Button("SetLobbyOwner(m_Lobby, SteamUser.GetSteamID())"))
        {
            bool ret = SteamMatchmaking.SetLobbyOwner(m_Lobby, SteamUser.GetSteamID());
            print("SteamMatchmaking.SetLobbyOwner(" + m_Lobby + ", " + SteamUser.GetSteamID() + ") : " + ret);
        }

        if (GUILayout.Button("SetLinkedLobby(m_Lobby, m_Lobby)"))
        {
            bool ret = SteamMatchmaking.SetLinkedLobby(m_Lobby, m_Lobby);
            print("SteamMatchmaking.SetLinkedLobby(" + m_Lobby + ", " + m_Lobby + ") : " + ret);
        }

        //SteamMatchmaking.CheckForPSNGameBootInvite() // PS3 Only.

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
    }