Version: 2019.1

MaterialEditor

class in UnityEditor

/

継承:Editor

マニュアルに切り替える

説明

Unity マテリアルエディター

Extend this class to write your own custom material editor. For more detailed information see the Custom Material Editor section of the ShaderLab reference.

Static 変数

kMiniTextureFieldLabelIndentLevelミニテクスチャフィールドとして同じインデントが必要なシェーダープロパティーをインデントするのに役に立ちます

変数

isVisible現在のマテリアルが展開されているかどうか

Public 関数

Awakeエディターが Awake となったときに呼び出されます
BeginAnimatedCheckCreates a Property wrapper, useful for making regular GUI controls work with MaterialProperty.
ColorPropertyカラーシェーダープロパティーのためのプロパティーフィールドを描画します
DefaultPreviewGUIマテリアルのプレビュー領域のデフォルトの処理
DefaultPreviewSettingsGUIマテリアルのプレビュー領域のデフォルトのツールバー
DefaultShaderPropertyすべてのカスタム Drawer を無視して一つのシェーダープロパティーの UI をハンドリングします
DoubleSidedGIFieldDisplay UI for editing a material's Double Sided Global Illumination setting. Returns true if the UI is indeed displayed i.e. the material supports the Double Sided Global Illumination setting. +See Also: Material.doubleSidedGI.
EmissionEnabledPropertyThis function will draw the UI for controlling whether emission is enabled or not on a material.
EnableInstancingFieldDisplay UI for editing material's render queue setting.
EndAnimatedCheckEnds a Property wrapper started with BeginAnimatedCheck.
FloatPropertyfloat シェーダープロパティーのためのプロパティーフィールドを描画します
GetPropertyHeightプロパティーに必要な高さを算出します
GetTexturePropertyCustomAreaラベルの下で大きないくつかのオブジェクトフィールドの前にフリーな Rect を返します。タイルやオフセットプロパティーなどに使用されます。
HasPreviewGUIこのコンポーネントは、現在の状態でプレビューすることができるかどうか
HelpBoxWithButtonメッセージとボタンを含むヘルプボックスを作り、ボタンが押された場合、True を返します
IsInstancingEnabledDetermines whether the Enable Instancing checkbox is checked.
LightmapEmissionFlagsPropertyDraws the UI for setting the global illumination flag of a material.
LightmapEmissionPropertyこの関数はライトマップエミッションプロパティーの UI を描画します。 (None, Realtime, Baked)See Also: MaterialLightmapFlags.
OnDisableエディターが無効化されるときにコールされ、もし上書きされた場合、ベースの OnDisable() を呼び出しすることでマテリアルインスペクターのセットアップが正しいことを保証する必要があります
OnEnableエディターが有効化されるときにコールされ、もし上書きされた場合、ベースの OnEnable() を呼び出しすることでマテリアルインスペクターのセットアップが正しいことを保証する必要があります
OnInspectorGUI特定の MaterialEditor GUI コードをここに実装します。もし既存のエディターを拡張したいだけの場合、カスタム GUI コードが実行される前に、元となる OnInspectorGUI () を呼び出します
OnPreviewGUIイメージコンポーネントのためのカスタムプレビュー。
PropertiesChangedマテリアルプロパティーが変更されたときこの関数を呼び出してください。これによりインスペクターが再ビルドされ、プロパティーをチェックします
PropertiesDefaultGUIシェーダープロパティーのデフォルトのレンダリング
PropertiesGUI標準マテリアルのプロパティーをレンダリングし、 IShaderGUI インスタンスを使用してプロパティーを表示するか、そうでない場合は PropertiesDefaultGUI を使用します
RangePropertyレンジシェーダープロパティーのためのレンジスライダーを描画します
RegisterPropertyChangeUndoマテリアルプロパティーを変更したときに呼び出し、アクションの取り消しを追加します
RenderQueueFieldDisplay UI for editing material's render queue setting.
RequiresConstantRepaintこの編集結果は現在の状態で常に再描画される必要があるかどうか。
SetDefaultGUIWidthsPropertiesGUI を使用して EditorGUIUtility.fieldWidth と labelWidth をデフォルト値に設定します
SetShaderマテリアルのシェーダーを設定します
ShaderProperty単一シェーダープロパティーの UI をハンドリングします
TextureCompatibilityWarning特定のプロパティーに不適切な種類のテクスチャを指定した場合、問題を解決するために適切な警告を表示し、ユーザーに示唆します
TexturePropertyテクスチャシェーダープロパティーのプロパティーフィールドを描画します
TexturePropertyMiniThumbnailテクスチャシェーダープロパティーのプロパティーフィールドを描画します
TexturePropertySingleLine追加のインラインプロパティーを持つテクスチャプロパティーコントロールを表示するメソッド
TexturePropertyTwoLinesプロパティーのコンパクトなレイアウトを表示するためのメソッド
TexturePropertyWithHDRColorHDR カラーフィールドとその色の明るさの float タイプのフィールドを持つテクスチャプロパティーコントロールを表示するメソッド
TextureScaleOffsetPropertyテクスチャのタイリングとオフセットプロパティーを描画します
VectorPropertyレンジシェーダープロパティーのためのレンジスライダーを描画します

Protected 関数

OnShaderChangedA callback that is invoked when a Material's Shader is changed in the Inspector.

Static 関数

ApplyMaterialPropertyDrawers初期の MaterialPropertyDrawer の値を適用します
FixupEmissiveFlagReturns a properly set global illlumination flag based on the passed in flag and the given color.
GetDefaultPropertyHeightカスタム Drawer を無視してプロパティーに必要な高さを算出します
GetFlexibleRectBetweenFieldAndRightEdgeGUI がレイアウトする ShaderGUI のためのユーティリティメソッド カラーフィールドを左に配置した後の Rect の使用例です。
GetFlexibleRectBetweenLabelAndFieldGUI がレイアウトする ShaderGUI のためのユーティリティメソッド
GetLeftAlignedFieldRectGUI がレイアウトする ShaderGUI のためのユーティリティメソッド
GetMaterialProperties渡されたマテリアルのシェーダープロパティー情報を取得します
GetMaterialPropertyひとつのシェーダープロパティーに関する情報を取得します
GetRectAfterLabelWidthGUI がレイアウトする ShaderGUI のためのユーティリティメソッド これは複数のプロパティーを使用できるラベル後の Rect です。Input Rect は EditorGUILayout.GetControlRect を呼び出すことで取得できます。
GetRightAlignedFieldRectGUI がレイアウトする ShaderGUI のためのユーティリティメソッド

継承メンバー

変数

serializedObjectobject や objects の SerializedObject
targetターゲットとなるオブジェクト
targets複数選択された場合のターゲットとなるオブジェクト群
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名

Public 関数

DrawDefaultInspectorDraws the built-in inspector.
DrawHeaderRedraw any inspectors that shows this editor.
DrawPreviewプレビュー描画するための最初のエントリーポイントです。
GetInfoStringプレビューにアセットの情報を表示するにはこのメソッドを使用します。
GetPreviewTitleプレビューのタイトルを変更したい場合はこのメソッドをオーバーライドします。
OnInteractivePreviewGUI自身のカスタムのインタラクティブなプレビューを作成するために実装します。カスタムのインタラクティブなプレビューはインスペクター上のプレビューエリアとオブジェクト選択ツールで使用されます
OnPreviewSettingsプレビューのヘッダーを自由にカスタマイズしたい場合にオーバーライドして使用します。
RenderStaticPreviewOverride this method if you want to render a static preview.
Repaintこの Editor を表示しているインスペクターを再描画させます。
UseDefaultMarginsデフォルトのマージンを取らせたくない場合、Editor を継承したクラスでメソッドをオーバーライドし、false を返すようにします
GetInstanceIDオブジェクトのインスタンス ID を返します
ToStringReturns the name of the GameObject.

Protected 関数

ShouldHideOpenButtonReturns the visibility setting of the "open" button in the Inspector.

Static 関数

CreateCachedEditorOn return previousEditor is an editor for targetObject or targetObjects. The function either returns if the editor is already tracking the objects, or destroys the previous editor and creates a new one.
CreateCachedEditorWithContextCreates a cached editor using a context object.
CreateEditor targetObject や複数の targetObjects のためのカスタムエディターを作成します。
CreateEditorWithContextMake a custom editor for targetObject or targetObjects with a context object.
Destroyゲームオブジェクトやコンポーネント、アセットを削除します
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeタイプから見つけたすべてのアクティブのオブジェクト配列を返します
Instantiateoriginal のオブジェクトをクローンします
CreateInstanceScriptableObject のインスタンスを作成します。

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。

メッセージ

OnSceneGUIEnables the Editor to handle an event in the Scene view.
OnDestroyScriptableObject が破棄されるとき、この関数は呼び出されます。

Events

finishedDefaultHeaderGUIAn event raised while drawing the header of the Inspector window, after the default header items have been drawn.