Chat Stream
Like what your seeing?
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Introduction
Displays a flow of chat messages such as those received from the Clan Chat Director or Lobby Chat Director.
namespace HeathenEngineering.SteamworksIntegration.UI
public class ChatStream : MonoBehaviour
Fields and Attributes
History Length
[SerializeField]
private uint historyLength = 200;
How many chat entries should the tool maintain. When the count exceeds this number the oldest message will be destroyed. This is important for managing total memory use and keeping Unity UI from getting out of hand with long or fast running chats.
Content
[SerializeField]
private Transform content;
The root where chat messages will be spawned as they come in
Message Template
[SerializeField]
private GameObject messageTemplate;
The object that will be cloned / instantiated for each received message. This should contain a component in the root of the template that implements the IChatMessage interface.
Methods
Handle Clan Message
public void HandleClanMessage(ClanChatMsg message)
Used by the Clan Chat Director to apply a clan chat message
Handle Lobby Message
public void HandleLobbyMessage(LobbyChatMsg message)
Used by the Lobby Chat Director to apply a lobby chat message
Handle Message
public void HandleMessage(UserData sender, string message, EChatEntryType type)
Last updated