Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

GUI.backgroundColor

マニュアルに切り替える
public static Color backgroundColor;

説明

GUI によってレンダリングされるすべての背景要素のグローバルなカラー

これは color を掛けたものを取得します。

See Also: contentColor, color.


ボタンに黄色の背景カラーを適用

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { GUI.backgroundColor = Color.yellow; GUI.Button(new Rect(10, 10, 70, 30), "A button"); } }