- Home /
Multiple Selectable components on GameObject inconsistent
I am using keyboard keys for certain functionality in my application, but I also have a InputFields where text can be entered. In order to avoid triggering the functionality when text is entered I have made a script that detectes if the InputField is higlighted. I used the example from the manual: https://docs.unity3d.com/2018.2/Documentation/ScriptReference/UI.Selectable.IsHighlighted.html
I have been able to add this to one of my InputFIelds in a testscene and it works fine. But now I want to add it to another InputField and suddenly I get the error message that it can not be added because the GameObject already contains a Selectable object. Which is correct, but for the first InputField this was no problem.
In the image you can see that on InputField Y Value it is no problem, but when I want to add the script to InputFIeld Z Value I get the error.
I hope someone can explain why this is happening and how to fix it.
Thanks!
Your answer
![](https://koobas.hobune.stream/wayback/20220612233926im_/https://answers.unity.com/themes/thub/images/avi.jpg)