This is basically my script:
void Update ()
{
if(Input.GetKeyDown(KeyCode.Return) && !isChatFocused)
{
isChatFocused = true;
inputField.ActivateInputField();
}
if(Input.GetKeyDown(KeyCode.Return) && isChatFocused)
{
isChatFocused = false;
inputField.DeactivateInputField();
}
}
The first part works fine and I am able to focus on the Input Field but for some reason I am not able to Un Focus from it when I press Return again. Please help.