How to check what UI type is currently in focus
Hello,
I have a fairly complex UI system set up with lots of input fields. If none of the input fields are in focus I want to be able to handle input key events to trigger other elements. Currently when typing in an input field, if a specific character is typed that is also designated to trigger an element, that unwanted trigger occurs. Is there a way to globally check which UI type is in focus?
There seems to be something with GUI. GetNameOfFocusedControl but I cannot set these names for UI within the inspector.
Thank you for your help, Tegan
Answer by ilyavitek · Aug 27, 2018 at 08:34 AM
I think that you can use currentSelectedGameObject in Event System.
Your answer
Follow this Question
Related Questions
Limit line length on input field 0 Answers
Unity UI InputField can't type Chinese in iOS by speed dial type keyboard 1 Answer
Input Field ignore mouse click 0 Answers
Input Field Not Interactible 0 Answers