Reputation: 101
I am planning to do logging and registration. But I have a problem. I can't make the password InputField became like ***** (censored).
And maybe it wouldn't affect your answers but my game will be on the android platform.
Thank you.
Upvotes: 7
Views: 20802
Reputation:
now you have a property in unity than you can change directly change . you select content type in Input field text and your value is change
Upvotes: 25
Reputation: 4075
What about using InputField of the new UI ? You can set the content to Password:
Doc:
http://docs.unity3d.com/es/current/Manual/script-InputField.html
Upvotes: 0
Reputation: 245
Try something like
public string thePassword = "12345";
void OnGUI()
{
passwordToEdit = GUI.PasswordField(new Rect(10, 10, 200, 20),
passwordToEdit, "*"[0], 25);
}
Upvotes: 0
Reputation: 607
Just use a EditText
and set its inputType="textPassword
Herr is also an example to do so: http://www.mkyong.com/android/android-password-field-example/
Upvotes: 2