Version: 2017.1

GUISettings.tripleClickSelectsLine

切换到手册
public bool tripleClickSelectsLine ;

描述

在文本字段中单击三次是否应该选择全部文本。

默认设置为 true。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public string str = "This is a string with \n two lines of text"; void OnGUI() { GUI.skin.settings.tripleClickSelectsLine = false; str = GUILayout.TextArea(str); } }