Page cover

Chat Stream

Like what your seeing?

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