private void ui_click_joinLobbyButtonPressed(Button b, SteamHubLobby lobby) { noMessagesHint.SetActive(true); b.interactable = false; SteamHub.Lobby_Join(lobby); }
private void ui_click_kickFromLobbyButtonPressed(Button b, SteamHubLobby lobby, CSteamID memberToKick) { b.interactable = false; Debug.Log(" Sending KICK to " + memberToKick.m_SteamID.ToString()); // KICK is just a magic lobby message string kickMessage = KICK_LOBBY_MESSAGE_COMMAND + memberToKick.m_SteamID.ToString(); byte[] kickMsgAsBytes = Encoding.ASCII.GetBytes(kickMessage); SteamMatchmaking.SendLobbyChatMsg(lobby.LobbyId, kickMsgAsBytes, kickMsgAsBytes.Length + 1); }
private void MyCallbacks_LobbyCreated(SteamHubLobby lobby) { int elo; //bool ret = SteamUserStats.GetStat("NumGames", out elo); //if (ret) // lobby.SetData<string>("ELO", ret); lobby.SetData <string>("name", lobbyName.GetComponent <Text>().text); Debug.Log("LOBBY CREATED CALLBACK: Lobby name\"" + lobby.GetData <string>("name") + "\""); }
private void MyCallbacks_LobbyEntered(SteamHubLobby lobby) { SteamHub.Lobby_RefreshList(); SteamHub.LobbyActive.SetData <string>(SteamUser.GetSteamID().ToString(), "false"); lobbyEnteredCounter++; Debug.Log("LobbyEntered called " + lobbyEnteredCounter.ToString() + " times. Last entered lobby # " + ((lobby == null) ? "NULL" : lobby.LobbyId.ToString())); foreach (Transform child in chatBox.transform) { GameObject.Destroy(child.gameObject); } }
private void ui_click_leaveLobbyButtonPressed(Button b, SteamHubLobby lobby) { b.interactable = false; SteamHub.Lobby_LeaveActive(); }
private void MyCallbacks_LobbyDataUpdated(SteamHubLobby lobby) { //don't refresh list here, can cause infinite loop }