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

スクリプト言語

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

Editor.OnInspectorGUI

マニュアルに切り替える
public void OnInspectorGUI();

説明

カスタムインスペクターを作成するためにこの関数を実装します

この関数内で特定のオブジェクトクラスのインスペクターのカスタム GUI を追加できます。

注意: この関数が動作するためにはこの設定を上書きする必要があります。チェックの例。

関連項目: Editor.DrawDefaultInspector.

using UnityEngine;
using System.Collections;
using UnityEditor;

//Creates a custom Label on the inspector for all the scripts named ScriptName // Make sure you have a ScriptName script in your // project, else this will not work. [CustomEditor(typeof(ScriptName))] public class TestOnInspector : Editor { public override void OnInspectorGUI() { GUILayout.Label ("This is a Label in a Custom Editor"); } }