Version: 2017.1

GUISettings.doubleClickSelectsWord

切换到手册
public bool doubleClickSelectsWord ;

描述

在文本字段中双击是否应该选择单词。

默认设置为 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.doubleClickSelectsWord = false; str = GUILayout.TextArea(str); } }