private void OnLobbyCreated(LobbyCreated_t callback)
{
if (callback.m_eResult != EResult.k_EResultOK)
return;
CurrentLobbyID = callback.m_ulSteamIDLobby;
SteamMatchmaking.SetLobbyData(new CSteamID(CurrentLobbyID), "HostAddress", SteamUser.GetSteamID().ToString());
SteamMatchmaking.SetLobbyData(new CSteamID(CurrentLobbyID), "name", SteamFriends.GetPersonaName().ToString() + "'s lobby");
_fishySteamworks.SetClientAddress(SteamUser.GetSteamID().ToString());
_fishySteamworks.StartConnection(true);
Debug.Log("Lobby creation was successful");
}
private void OnJoinRequest(GameLobbyJoinRequested_t callback)
{
SteamMatchmaking.JoinLobby(callback.m_steamIDLobby);
}
private void OnLobbyEntered(LobbyEnter_t callback)
{
CurrentLobbyID = callback.m_ulSteamIDLobby;
MainMenuUI.LobbyEntered(SteamMatchmaking.GetLobbyData(new CSteamID(CurrentLobbyID), "name"), _networkManager.IsServerStarted);
_fishySteamworks.SetClientAddress(SteamMatchmaking.GetLobbyData(new CSteamID(CurrentLobbyID), "HostAddress")); // <--- RIGHT HERE
_fishySteamworks.StartConnection(false);
}