ToggleInputField

Toggles the state of 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...
		if( Input.GetKeyDown( KeyCode.Return ) )
        	{
        		// Toggle the state of the input field.
        		chatBox.ToggleInputField();
        	}
	}
}

Last updated