var onActive : GUIStyleState
Description描述
Rendering settings for when the element is turned on and pressed down.
用于当元素被打开并且被按下时的渲染设置。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
if (GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].onActive.textColor = Color.yellow;
}
}
// Sets the text color to yellow of customStyles[0] when an
// element is turned on and pressed down
//当元素被打开并且被按下时,设置customStyles[0]的文本颜色为黄色
function OnGUI() {
if(GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].onActive.textColor = Color.yellow;
}