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.selectionColor

Switch to Manual
public var selectionColor: Color;

Description

The color of the highlighter to show which characters are selected.

#pragma strict
// Required when Using UI elements.
public class Example {
	public var mainInputField;
	// Changes the color of the highlighter that shows what characters are selected.
	function ChangeSelectionColor() {
		mainInputField.selectionColor = Color.red;
	}
}