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