- Home /
The question is answered, right answer was accepted
Can't click on Input fields.
That's it. I click on the input field, and nothing happens. I can't input anything, or delete stuff. The cursor thing doesn't even appear. When I hover over it, it doesn't change color. A script makes it active/inactive frequently, so that might have something to do with it, but I don't think so. I didn't do anything weird, and nothing is blocking it. Interactive is checked. What's going on?
**Link to previous question, when only half of it was unresponsive:**
This is the script that makes it active/inactive
creationGUI.SetActive(true);
and creationGUI.SetActive(false);
The input fields are within creationGUI
. There are five input fields there, but only four have this problem. The fifth works.
You can only input something when the input field is active.
True, but you can also only see it and click on it when it's active. And it's not working.
Answer by SoshJam · Aug 13, 2018 at 05:16 PM
Okay something was blocking it, I just didn't see it because it was the border of a text box that was too big. Way to go, me.
Answer by niiicolai · Aug 11, 2018 at 01:49 AM
Maybe your scene is missing an EventSystem
object. Add it under Hierarchy > create > UI > EventSystem (https://docs.unity3d.com/ScriptReference/EventSystems.EventSystem.html)
It's responsible handling Input events and you are therefore not able to click on components like buttons, inputfields etc. in the specific scene if it's missing.
No, everything else works fine. It's just those four input fields, and everything else works.
Ah okay. Can you share the code that is manipulating the Inputs then? Also have you tried to disable the scripts to see if the inputs is working without?
Thanks for the suggestions! I tried disabling the scripts, but it didn't work. I posted the code in the original question, as well as a link to a previous question from when only half of the input field didn't work.
Thanks ! That's exactly what I needed. I created some reusable pieces of UI using the new prefab system, added them to the object tree, but it did not automatically add an event system, so I had this problem.
Answer by Strixie13 · Aug 10, 2018 at 07:37 PM
It might be underneath another UI element and thus not clickable. Make sure there are no panels overlapping it on the canvas hierarchy.