⚪
Tank & Healer Studio Assets
Return to Website
Ultimate Chat Box
Ultimate Chat Box
  • 🟠Introduction
    • 👋Welcome!
    • ⚡Getting Started
  • 📖Documentation
    • UltimateChatBox
      • Public Methods
        • RegisterChat (+4 overloads)
        • Enable
        • Disable
        • ClearChat
        • EnableInputField
        • ToggleInputField
        • DisableInputField
        • SendCustomInput
        • FindChatsFromUser
        • FindChatsOfStyle
        • UpdatePositioning
      • Events
        • OnChatRegistered
        • OnUsernameHover
        • OnUsernameInteract
        • OnInputFieldUpdated
        • OnInputFieldSubmitted
        • OnInputFieldCommandUpdated
        • OnInputFieldCommandSubmitted
        • OnExtraImageInteract
      • Public Classes
        • ChatInformation
        • ChatStyle
      • Properties
    • UltimateChatBoxStyles
      • Creating a custom Chat Style
  • 💡Tips & Tricks
    • Catching Commands
  • Helpful Links
    • Support Discord
    • Leave us a review!
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. UltimateChatBox
  3. Events

OnExtraImageInteract

This event is called when the extra image associated with the input field has been interacted with.

using UnityEngine;
using TankAndHealerStudioAssets;

public class ChatBoxExample : MonoBehaviour
{
	// BE SURE TO ASSIGN THIS IN THE INSPECTOR //
	public UltimateChatBox chatBox;


	void Start ()
	{
		chatBox.OnExtraImageInteract += () =>
   		{
                	print( $"Extra image interacted." );
                	// Disable the input field. This is useful for the extra image being an "Enter" button for the input field.
                	chatBox.DisableInputField();
		};
		
		// OR //
		
		chatBox.OnExtraImageInteract += OnExtraImageInteract;
	}
	
	void OnExtraImageInteract ()
	{
		print( $"This also works! Extra image interacted." );
	}
}

PreviousOnInputFieldCommandSubmittedNextPublic Classes

Last updated 6 months ago

Was this helpful?

📖