Creating a custom Chat Style
using UnityEngine;
using TankAndHealerStudioAssets;
public class ChatBoxExample : MonoBehaviour
{
// BE SURE TO ASSIGN THIS IN THE INSPECTOR //
public UltimateChatBox chatBox;
// YOU CAN EDIT THIS INFORMATION IN THE INSPECTOR //
public UltimateChatBox.ChatStyle customStyle = new UltimateChatBox.ChatStyle()
{
usernameBold = true,
usernameItalic = false,
usernameUnderlined = false,
usernameColor = Color.red,
disableInteraction = false,
noUsernameFollowupText = false,
messageBold = true,
messageItalic = true,
messageUnderlined = true,
messageColor = Color.red,
};
void Start ()
{
chatBox.RegisterChat( "PlayerName", "This message is in my custom style!", customStyle );
}
}
Last updated