Steamworks.SteamMatchmaking.RequestLobbyList C# (CSharp) Méthode

RequestLobbyList() public static méthode

/////

Game lobby functions

Get a list of relevant lobbies

this is an asynchronous request

results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found

this will never return lobbies that are full

to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call

use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g.

class CMyLobbyListManager

{

CCallResult<CMyLobbyListManager, LobbyMatchList_t> m_CallResultLobbyMatchList;

void FindLobbies()

{

// SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList()

SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList();

m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList );

}

void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure )

{

// lobby list has be retrieved from Steam back-end, use results

}

}

public static RequestLobbyList ( ) : SteamAPICall_t
Résultat SteamAPICall_t
		public static SteamAPICall_t RequestLobbyList() {
			InteropHelp.TestIfAvailableClient();
			return (SteamAPICall_t)NativeMethods.ISteamMatchmaking_RequestLobbyList();
		}