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
Was this helpful?