Unity send to message and charecter movement

How can I prevent the character from moving while typing a message?


Hello @sansar_sungur,

To prevent the character from moving while typing a message, you can add the following if block before your movement logic:

if (!EventSystem.current.IsPointerOverGameObject() && !UIUtilities.IsAnyInputFieldFocused())
{
    // Add your movement logic here
}

This ensures that the movement is only processed when the player is not interacting with UI elements like input fields.

Let us know if you need further assistance! :blush:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.