Hi ArenMook,
The 3.5.6 update featured this fix, presumably in response to
this thread:
- FIX: UICamera's 'inputHasFocus' flag is now set when selection changes rather than every frame.
Previously I was using UICamera.inputHasFocus to prevent custom key bindings from firing while typing in an input field with a simple check:
if( !UICamera.inputHasFocus ) {
//Custom key coding
}
This does not work since the update, I assume because it is no longer checked every frame. The fix log states that the flag is set when the "selection changes"; does that mean when you click into an input field and/or out of it as well? Because in all my tests, I can't seem to get inputHasFocus to set true at all.
With both 3.5.6 and the latest 3.5.8, I set up a new project with just NGUI, and added your "Control - Simple Input Field", along with a test script to return the status of UICamera.inputHasFocus. Clicking into the input, typing, clicking outside - none of these seem to set the bool true;
Am I just using this wrong since the update? If so, I would greatly appreciate some insight into its proper usage.
Thanks.