お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Closeデフォルトのインスペクターを描画します
自動でインスペクターに描画するためにOnInspectorGUIメソッド内からこの関数を呼び出します。 これは全体のインスペクタ表示を1から入力したくない時に便利ですが、 いくつかのボタンなどを追加したい場合には当てはまりません。 See Also: OnInspectorGUI.
// This example shows a custom inspector for an // object "MyPlayerEditor", which has two variables, speed and ammo. @CustomEditor(MyPlayerEditor) class MyPlayerEditor extends Editor { function OnInspectorGUI() { EditorGUILayout.LabelField ("Some help", "Some other text"); target.speed = EditorGUILayout.Slider ("Speed", target.speed, 0, 100); // Show default inspector property editor DrawDefaultInspector (); } }