trying to implement the thing where the textfield has a default value and will clear the value when the user wants to type something in. Below is the code snippet used
Works fine in play mode, but when deployed to a mobile device like android I notice that when u press on the textfield it would call FocusInEvent and then FocusOutEvent immediately when the on screen keyboard pops up.
But doesn’t help with the FocusOutEvent being called when the on screen keyboard appears.
Tried using OnApplicationFocus but sometimes the textfield clears the input by itself… think theres something with the timing of things executing I’m not accounting for
Maybe I’ll just wait for them to implement placeholder text… lol 2022 eh?
I think placeholer text (among most useful features for input fields) is scheduled for 2023
Don’t remember where I read it, but will drop a link if I find it. Have not tested for mobile because all input is broken on Unity Remote, but I do have a solution for placeholder text that at least works for PC.
Yea I can get it to work on PC, just not mobile. Just tried iOS… it treats OnApplicationFocus differently from Android. Its a real mess, guess I really do have to wait.