For the complete documentation index, see llms.txt. This page is also available as Markdown.

OnInputFieldSubmitted

This event is called when the input field of the chat box has been submitted.

Parameters

string

The string value of the input field.

using UnityEngine;
using TankAndHealerStudioAssets;

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


	void Start ()
	{
		chatBox.OnInputFieldSubmitted += ( message ) =>
		{
			print( $"Input Field Submitted: {message}" );
		};

		// OR //

		chatBox.OnInputFieldSubmitted += OnInputFieldSubmitted;
	}

	void OnInputFieldSubmitted ( string message )
	{
		print( $"This also works! Input Field Submitted: {message}" );
	}
}

Last updated