RegisterChat (+4 overloads)
Registers the chat information to the chat box so that it will be displayed to the player.
Overload Methods
RegisterChat( string message )
RegisterChat( string username, message )
RegisterChat( string message, UltimateChatBox.ChatStyle style )
RegisterChat( string username, string message, UltimateChatBox.ChatStyle style )
using UnityEngine;
using TankAndHealerStudioAssets;
public class ChatBoxExample : MonoBehaviour
{
// BE SURE TO ASSIGN THIS IN THE INSPECTOR //
public UltimateChatBox chatBox;
void Update ()
{
// If the space bar has been pressed...
if( Input.GetKeyDown( KeyCode.Space ) )
{
// Register a basic chat from PlayerName in the bold username style.
chatBox.RegisterChat( "PlayerName", "This will be the content of the message", UltimateChatBoxStyles.boldUsername );
}
}
}Last updated
Was this helpful?