|
When I test my game's twitter login view in the editor, the GUILayout.PasswordField() works as expected hiding every character immediately and revealing nothing. However when I run it on my iPhone 4 and it has to have the characters input from the iOS keyboard it behaves much differently. It actually shows the ENTIRE PASSWORD until the user hits the Done button confirming they are finished entering their password where it finally turns them all into the asterisk character I gave it. There's no way I can use it like this as it would potentially reveal many of my user's twitter passwords to onlookers. Any ideas on how to fix this would be INDESCRIBABLY HELPFUL! I'll add my OnGUI() implementation here.
(comments are locked)
|
|
Until the bug is fixed, you may be able to get around it by making the text invisible by changing the transparency, and then drawing a series of "*" over top in the regular color of it equal to the length of the text. e.g. (untested, but should give the gist) If the GUI.contentColor doesn't work as expected you could just make a special "invisible text textfield" GUIStyle and pass that instead (same basic idea, just a different way). Just tested, it works flawlessy. Thanks a lot, I really needed this! But unfortunately, the original bug is still here...
Apr 23 at 10:12 PM
DanjelRicci
(comments are locked)
|
|
Almost a year has passed and this bug is still there... The problem with the previous hack from Molix is that the virtual keyboard is still showing the password on my iPad... To get around that, you may use the hack from Molix and hide the keyboard text field: Or you may hide the GUI text when typing the password on the virtual keyboard: (This code is for Unity 3.5, replace TouchScreenKeyboard by iPhoneKeyboard if you are using Unity 3.4) This last solution is not perfect since the password is still briefly displayed when the keyboard is sliding...
(comments are locked)
|
|
I've found a workaround for this bug, using an invisible button and the TouchScreenKeyboard.Open() function. See my post (the 4th one) for an example here: http://forum.unity3d.com/threads/65337-GUI.PasswordField-issue
(comments are locked)
|

Filed a bug report. Hopefully they can find a fix for me soon so I don't end up using a hack work around.
Bug is confirmed and with a developer for fixing. (June 29th 2011)