TMPro Input Field - deselect on mouse click
Hi Everyone, I have an issue that I'm struggling with and can't figure out... I'm using TMPro Field Input in my project. The problem is that, when I expected "deselection/deactivation" (like I finished working with Input Field etc) the deselection is not really happening. I tried different things like:
ReleaseSelection(); EventSystem.current.SetSelectedGameObject(null); EventSystem.current != null ?EventSystem.current.currentSelectedGameObject : null; OnDeselect(null); ReleaseSelection();
But nothing really helps! And I found that clicking by mouse anywhere else is doing what I'm looking for. Could you please advise what method to call to simulate the same thing like clicking mouse somewhere else in order to properly deselect TMPro Input Field?
Answer by lifefornazgul · Feb 13 at 06:31 AM
So far, the best solution is: 1. creating hidden (alpha 0, scale 0) Field Input. 2. Selecting that fake Field Input when you need to deselect properly your existent one.
Your answer
![](https://koobas.hobune.stream/wayback/20220613052920im_/https://answers.unity.com/themes/thub/images/avi.jpg)