OnInputFieldCommandSubmitted
This event is called when the input field is submitted and contains a potential command.
Parameters
using UnityEngine;
using TankAndHealerStudioAssets;
public class ChatBoxExample : MonoBehaviour
{
// BE SURE TO ASSIGN THIS IN THE INSPECTOR //
public UltimateChatBox chatBox;
void Start ()
{
chatBox.OnInputFieldCommandSubmitted += ( command, message ) =>
{
print( $"Potential Command: {command} with message: {message}." );
};
// OR //
chatBox.OnInputFieldCommandSubmitted += OnInputFieldCommandSubmitted;
}
void OnInputFieldCommandSubmitted ( string command, string message )
{
print( $"This also works! Potential Command: {command} with message: {message}." );
}
}Last updated