Version: 2017.1

InputField.selectionColor

切换到手册
public Color selectionColor ;

描述

突出显示的颜色,以显示选择了哪些字符。

using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.

public class Example : MonoBehaviour { public InputField mainInputField;

// Changes the color of the highlight that shows what characters are selected. void ChangeSelectionColor() { mainInputField.selectionColor = Color.red; } }