Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

InputField.asteriskChar

Switch to Manual
public var asteriskChar: char;

Description

The character used for password fields.

#pragma strict
// Required when Using UI elements.
public class Example {
	public var mainInputField;
	function Start() {
		// changes the password symbol. 0 = $, 1 = ! 2 = £ and so on.
		mainInputField.asteriskChar = "$!£%&*"[0];
	}
}