DisableInputField

Disables the input field associated with the Ultimate Chat Box.

using UnityEngine;

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

	void Update ()
	{
		// If the Return key was pressed this frame and the input field is currently enabled...
		if( Input.GetKeyDown( KeyCode.Return ) && chatBox.InputFieldEnabled )
        	{
        		// Disable the input field.
        		chatBox.DisableInputField();
        	}
	}
}

Last updated