private void OnLobbyChatMsg(LobbyChatMsg_t pCallback) { CSteamID SteamIDUser; byte[] Data = new byte[4096]; EChatEntryType ChatEntryType; int ret = SteamMatchmaking.GetLobbyChatEntry((CSteamID)pCallback.m_ulSteamIDLobby, (int)pCallback.m_iChatID, out SteamIDUser, Data, Data.Length, out ChatEntryType); if (DebugTextOn) { Debug.Log("SteamMatchmaking.GetLobbyChatEntry(" + (CSteamID)pCallback.m_ulSteamIDLobby + ", " + (int)pCallback.m_iChatID + ", out SteamIDUser, Data, Data.Length, out ChatEntryType) : " + ret + " -- " + SteamIDUser + " -- " + System.Text.Encoding.UTF8.GetString(Data) + " -- " + ChatEntryType); } //create a new lobby chat and add it to the chat message list LobbyChatMessageValue _chat = new LobbyChatMessageValue(); _chat.steamPersonaName = SteamFriends.GetFriendPersonaName(SteamIDUser); _chat.message = System.Text.Encoding.UTF8.GetString(Data); m_Lobby.m_ChatMessages.Add(_chat); if (DebugTextOn) { Debug.Log("Chat Messages Total: " + m_Lobby.m_ChatMessages.Count + "| Newest Message: " + _chat.message); } }
void OnLobbyChatMsg(LobbyChatMsg_t pCallback) { // Debug.Log("[" + LobbyChatMsg_t.k_iCallback + " - LobbyChatMsg] - " + pCallback.m_ulSteamIDLobby + " -- " + pCallback.m_ulSteamIDUser + " -- " + pCallback.m_eChatEntryType + " -- " + pCallback.m_iChatID); CSteamID SteamIDUser; byte[] Data = new byte[4096]; EChatEntryType ChatEntryType; int ret = SteamMatchmaking.GetLobbyChatEntry((CSteamID)pCallback.m_ulSteamIDLobby, (int)pCallback.m_iChatID, out SteamIDUser, Data, Data.Length, out ChatEntryType); // Debug.Log("SteamMatchmaking.GetLobbyChatEntry(" + (CSteamID)pCallback.m_ulSteamIDLobby + ", " + (int)pCallback.m_iChatID + ", out SteamIDUser, Data, Data.Length, out ChatEntryType) : " + ret + " -- " + SteamIDUser + " -- " + System.Text.Encoding.UTF8.GetString(Data) + " -- " + ChatEntryType); LobbyChatMessageValue _chat = new LobbyChatMessageValue(); _chat.steamPersonaName = SteamFriends.GetFriendPersonaName(SteamIDUser); _chat.message = System.Text.Encoding.UTF8.GetString(Data); m_ChatMessages.Add(_chat); Debug.Log("Chat Messages Total: " + m_ChatMessages.Count + "| Newest Message: " + _chat.message); //clear the chat lobbyChatMessage = ""; }