I know you can check if an input field is selected by the EventSystem with:
This method isn't perfect though since the EventSystem will still consider the input field to be selected even after hitting enter/submitting it. This issue can become annoying for something like a chat box where you ignore game...
Checking if an input field is focused
Code (csharp):
- public static bool IsInputFieldFocused()
- {
- return (obj != null && obj.GetComponent<InputField>() != null);
- }
Checking if an input field is focused