Legacy Documentation: Version 2018.2 (Go to current version)
LanguageEnglish
  • C#

InputField.selectionColor

public Color selectionColor;

Description

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

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; } }
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答