public float cursorFlashSpeed ;

描述

文本字段光标的闪烁速度。

该值表示每秒闪烁次数。如果将其设置为 0,将禁用闪烁。如果设置为 -1,则闪烁速度将与最终用户的系统默认值匹配。

using UnityEngine;

public class Example : MonoBehaviour { string str = "This is a string with \n two lines of text";

void OnGUI() { GUI.skin.settings.cursorFlashSpeed = 3; str = GUILayout.TextArea(str); } }