Returns all the chats that have been registered with the targeted style.
usingUnityEngine;publicclassChatBoxExample:MonoBehaviour{ // BE SURE TO ASSIGN THESE IN THE INSPECTOR //publicUltimateChatBox chatBox;voidUpdate () { // If the space key was pressed this frame...if( Input.GetKeyDown( KeyCode.Space ) ) { // Store an array with all the System Message chats. UltimateChatBox.ChatInformation[] chatsWithStyle = chatBox.FindChatsOfStyle( UltimateChatBoxStyles.systemMessage ).ToArray();
// Loop through each chat in the array and remove all the system messages from the chat box.for( int i =0; i <chatsFromUser.Length; i++ )chatsWithStyle[ i ].RemoveChat(); } }}