Can't keep the InputField focused
Hello everyone,
I have this input field where the user inputs his name for a GoogleVR app, while inputting the name, the app is not yet in VR mode, so XR=false and the EventsSystem object has the Standard input module active and enabled and the GoogleVR one disabled.
When the user taps on the InputField, the focus is immediately removed and I have defined no custom event on the Input Field.
In UnityEditor, I just can't input anything, when I click on the InputField the caret instantly disappears.
On Mobile devices (Android or iOS) the keyboard starts to slide in but then focus is lost and so keyboard then slides out, without being able to actually input any text.
What could affect this issue? I can provide any extra info if required
Answer by visionnaireMedia · Mar 05, 2020 at 02:27 PM
Ok I figured out. I had an object running:
EventSystem.current.SetSelectedGameObject(gameObject);
and therefore it was always set as selected GameObject all the time