C# Класс UnityEditor.MaterialEditor

Наследование: Editor
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CheckSetup void
ColorProperty Color
CreateCustomShaderGUI void
DetectShaderChanged void
DoPowerRangeProperty float
DoRenderPreview void
DoesPreviewAllowRotation bool
ExtraPropertyAfterTexture void
FloatProperty float
GetAssociatedRenderFromInspector UnityEngine.Renderer
GetColor Color
GetControlRectForSingleLine UnityEngine.Rect
GetFloat float
GetGlobalIlluminationInt int
GetPreviewType PreviewType
GetPropertyRect UnityEngine.Rect
GetTexture UnityEngine.Texture
GetTextureFieldHeight float
GetTextureOffset Vector2
GetTextureScale Vector2
GetVector Vector4
HandleRenderer void
HandleSkybox void
HasMultipleMixedShaderValues bool
Init void
IsMaterialEditor bool
OnAssetStoreInspectorGUI void
OnHeaderControlsGUI void
OnSceneDrag void
OnSelectedShaderPopup void
PreviewSettingsMenuButton bool
RangeProperty float
SetColor void
SetFloat void
SetTexture void
SetTextureOffset void
SetTextureScale void
SetVector void
ShaderPopup void
ShaderProperty void
ShaderPropertyInternal void
TextureProperty UnityEngine.Texture
TextureProperty UnityEngine.Texture
TexturePropertyBody UnityEngine.Texture
TextureScaleOffsetProperty Vector4
TextureValidator UnityEngine.Object
VectorProperty Vector4

Открытые методы

Метод Описание
ApplyMaterialPropertyDrawers ( Material material ) : void
ApplyMaterialPropertyDrawers ( UnityEngine targets ) : void
Awake ( ) : void
BeginAnimatedCheck ( MaterialProperty prop ) : void
ColorProperty ( MaterialProperty prop, string label ) : Color
ColorProperty ( Rect position, MaterialProperty prop, string label ) : Color
DefaultPreviewGUI ( Rect r, GUIStyle background ) : void
DefaultPreviewSettingsGUI ( ) : void
DefaultShaderProperty ( MaterialProperty prop, string label ) : void
DefaultShaderProperty ( Rect position, MaterialProperty prop, string label ) : void
EndAnimatedCheck ( ) : void
FloatProperty ( MaterialProperty prop, string label ) : float
FloatProperty ( Rect position, MaterialProperty prop, string label ) : float
GetDefaultPropertyHeight ( MaterialProperty prop ) : float
GetFlexibleRectBetweenFieldAndRightEdge ( Rect r ) : Rect
GetFlexibleRectBetweenLabelAndField ( Rect r ) : Rect
GetLeftAlignedFieldRect ( Rect r ) : Rect
GetMaterialProperties ( UnityEngine mats ) : UnityEditor.MaterialProperty[]
GetMaterialProperty ( UnityEngine mats, int propertyIndex ) : MaterialProperty
GetMaterialProperty ( UnityEngine mats, string name ) : MaterialProperty
GetPropertyHeight ( MaterialProperty prop ) : float
GetPropertyHeight ( MaterialProperty prop, string label ) : float
GetRectAfterLabelWidth ( Rect r ) : Rect
GetRightAlignedFieldRect ( Rect r ) : Rect
GetTexturePropertyCustomArea ( Rect position ) : Rect
HasPreviewGUI ( ) : bool
HelpBoxWithButton ( GUIContent messageContent, GUIContent buttonContent ) : bool
LightmapEmissionProperty ( ) : void
LightmapEmissionProperty ( Rect position, int labelIndent ) : void
LightmapEmissionProperty ( int labelIndent ) : void
OnDisable ( ) : void
OnEnable ( ) : void
OnInspectorGUI ( ) : void
OnInteractivePreviewGUI ( Rect r, GUIStyle background ) : void
OnPreviewGUI ( Rect r, GUIStyle background ) : void
OnPreviewSettings ( ) : void
PrepareMaterialPropertiesForAnimationMode ( MaterialProperty properties, bool isMaterialEditable ) : Renderer
PropertiesChanged ( ) : void
PropertiesDefaultGUI ( MaterialProperty props ) : void
PropertiesGUI ( ) : bool
RangeProperty ( MaterialProperty prop, string label ) : float
RangeProperty ( Rect position, MaterialProperty prop, string label ) : float
RegisterPropertyChangeUndo ( string label ) : void
RenderStaticPreview ( string assetPath, UnityEngine subAssets, int width, int height ) : Texture2D
RequiresConstantRepaint ( ) : bool
SetDefaultGUIWidths ( ) : void
SetShader ( Shader shader ) : void
SetShader ( Shader newShader, bool registerUndo ) : void
ShaderProperty ( MaterialProperty prop, string label ) : void
ShaderProperty ( MaterialProperty prop, string label, int labelIndent ) : void
ShaderProperty ( Rect position, MaterialProperty prop, string label ) : void
ShaderProperty ( Rect position, MaterialProperty prop, string label, int labelIndent ) : void
TextureCompatibilityWarning ( MaterialProperty prop ) : void
TextureProperty ( MaterialProperty prop, string label ) : Texture
TextureProperty ( MaterialProperty prop, string label, bool scaleOffset ) : Texture
TextureProperty ( Rect position, MaterialProperty prop, string label ) : Texture
TextureProperty ( Rect position, MaterialProperty prop, string label, bool scaleOffset ) : Texture
TextureProperty ( Rect position, MaterialProperty prop, string label, string tooltip, bool scaleOffset ) : Texture
TexturePropertyMiniThumbnail ( Rect position, MaterialProperty prop, string label, string tooltip ) : Texture
TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp ) : Rect
TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1 ) : Rect
TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1, MaterialProperty extraProperty2 ) : Rect
TexturePropertyTwoLines ( GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1, GUIContent label2, MaterialProperty extraProperty2 ) : Rect
TexturePropertyWithHDRColor ( GUIContent label, MaterialProperty textureProp, MaterialProperty colorProperty, ColorPickerHDRConfig hdrConfig, bool showAlpha ) : Rect
TextureScaleOffsetProperty ( Rect position, Vector4 scaleOffset ) : Vector4
TextureScaleOffsetProperty ( Rect position, Vector4 scaleOffset, bool partOfTexturePropertyControl ) : Vector4
TextureScaleOffsetProperty ( Rect position, MaterialProperty property ) : float
TextureScaleOffsetProperty ( Rect position, MaterialProperty property, bool partOfTexturePropertyControl ) : float
TextureScaleOffsetProperty ( MaterialProperty property ) : void
UndoRedoPerformed ( ) : void
VectorProperty ( MaterialProperty prop, string label ) : Vector4
VectorProperty ( Rect position, MaterialProperty prop, string label ) : Vector4

Защищенные методы

Метод Описание
OnHeaderGUI ( ) : void

Приватные методы

Метод Описание
CheckSetup ( ) : void
ColorProperty ( string propertyName, string label ) : Color
CreateCustomShaderGUI ( Shader shader, string oldEditorName ) : void
DetectShaderChanged ( ) : void
DoPowerRangeProperty ( Rect position, MaterialProperty prop, string label, float power ) : float
DoRenderPreview ( ) : void
DoesPreviewAllowRotation ( PreviewType type ) : bool
ExtraPropertyAfterTexture ( Rect r, MaterialProperty property ) : void
FloatProperty ( string propertyName, string label ) : float
GetAssociatedRenderFromInspector ( ) : Renderer
GetColor ( string propertyName, bool &hasMixedValue ) : Color
GetControlRectForSingleLine ( ) : Rect
GetFloat ( string propertyName, bool &hasMixedValue ) : float
GetGlobalIlluminationInt ( MaterialGlobalIlluminationFlags flags ) : int
GetPreviewType ( Material mat ) : PreviewType
GetPropertyRect ( MaterialProperty prop, string label, bool ignoreDrawer ) : Rect
GetTexture ( string propertyName, bool &hasMixedValue ) : Texture
GetTextureFieldHeight ( ) : float
GetTextureOffset ( string propertyName, bool &hasMixedValueX, bool &hasMixedValueY ) : Vector2
GetTextureScale ( string propertyName, bool &hasMixedValueX, bool &hasMixedValueY ) : Vector2
GetVector ( string propertyName, bool &hasMixedValue ) : Vector4
HandleRenderer ( Renderer r, int materialIndex, Event evt ) : void
HandleSkybox ( GameObject go, Event evt ) : void
HasMultipleMixedShaderValues ( ) : bool
Init ( ) : void
IsMaterialEditor ( string customEditorName ) : bool
OnAssetStoreInspectorGUI ( ) : void
OnHeaderControlsGUI ( ) : void
OnSceneDrag ( SceneView sceneView ) : void
OnSelectedShaderPopup ( string command, Shader shader ) : void
PreviewSettingsMenuButton ( Rect &buttonRect ) : bool
RangeProperty ( string propertyName, string label, float v2, float v3 ) : float
SetColor ( string propertyName, Color value ) : void
SetFloat ( string propertyName, float value ) : void
SetTexture ( string propertyName, Texture value ) : void
SetTextureOffset ( string propertyName, Vector2 value, int coord ) : void
SetTextureScale ( string propertyName, Vector2 value, int coord ) : void
SetVector ( string propertyName, Vector4 value ) : void
ShaderPopup ( GUIStyle style ) : void
ShaderProperty ( Shader shader, int propertyIndex ) : void
ShaderPropertyInternal ( Rect position, MaterialProperty prop, string label ) : void
TextureProperty ( string propertyName, string label, ShaderUtil texDim ) : Texture
TextureProperty ( string propertyName, string label, ShaderUtil texDim, bool scaleOffset ) : Texture
TexturePropertyBody ( Rect position, MaterialProperty prop ) : Texture
TextureScaleOffsetProperty ( Rect position, Vector4 scaleOffset, int mixedValueMask, bool partOfTexturePropertyControl ) : Vector4
TextureValidator ( UnityEngine references, System objType, UnityEditor.SerializedProperty property ) : Object
VectorProperty ( string propertyName, string label ) : Vector4

Описание методов

ApplyMaterialPropertyDrawers() публичный статический Метод

public static ApplyMaterialPropertyDrawers ( Material material ) : void
material UnityEngine.Material
Результат void

ApplyMaterialPropertyDrawers() публичный статический Метод

public static ApplyMaterialPropertyDrawers ( UnityEngine targets ) : void
targets UnityEngine
Результат void

Awake() публичный Метод

public Awake ( ) : void
Результат void

BeginAnimatedCheck() публичный Метод

public BeginAnimatedCheck ( MaterialProperty prop ) : void
prop MaterialProperty
Результат void

ColorProperty() публичный Метод

public ColorProperty ( MaterialProperty prop, string label ) : Color
prop MaterialProperty
label string
Результат Color

ColorProperty() публичный Метод

public ColorProperty ( Rect position, MaterialProperty prop, string label ) : Color
position UnityEngine.Rect
prop MaterialProperty
label string
Результат Color

DefaultPreviewGUI() публичный Метод

public DefaultPreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect
background UnityEngine.GUIStyle
Результат void

DefaultPreviewSettingsGUI() публичный Метод

public DefaultPreviewSettingsGUI ( ) : void
Результат void

DefaultShaderProperty() публичный Метод

public DefaultShaderProperty ( MaterialProperty prop, string label ) : void
prop MaterialProperty
label string
Результат void

DefaultShaderProperty() публичный Метод

public DefaultShaderProperty ( Rect position, MaterialProperty prop, string label ) : void
position UnityEngine.Rect
prop MaterialProperty
label string
Результат void

EndAnimatedCheck() публичный Метод

public EndAnimatedCheck ( ) : void
Результат void

FloatProperty() публичный Метод

public FloatProperty ( MaterialProperty prop, string label ) : float
prop MaterialProperty
label string
Результат float

FloatProperty() публичный Метод

public FloatProperty ( Rect position, MaterialProperty prop, string label ) : float
position UnityEngine.Rect
prop MaterialProperty
label string
Результат float

GetDefaultPropertyHeight() публичный статический Метод

public static GetDefaultPropertyHeight ( MaterialProperty prop ) : float
prop MaterialProperty
Результат float

GetFlexibleRectBetweenFieldAndRightEdge() публичный статический Метод

public static GetFlexibleRectBetweenFieldAndRightEdge ( Rect r ) : Rect
r UnityEngine.Rect
Результат UnityEngine.Rect

GetFlexibleRectBetweenLabelAndField() публичный статический Метод

public static GetFlexibleRectBetweenLabelAndField ( Rect r ) : Rect
r UnityEngine.Rect
Результат UnityEngine.Rect

GetLeftAlignedFieldRect() публичный статический Метод

public static GetLeftAlignedFieldRect ( Rect r ) : Rect
r UnityEngine.Rect
Результат UnityEngine.Rect

GetMaterialProperties() публичный статический Метод

public static GetMaterialProperties ( UnityEngine mats ) : UnityEditor.MaterialProperty[]
mats UnityEngine
Результат UnityEditor.MaterialProperty[]

GetMaterialProperty() публичный статический Метод

public static GetMaterialProperty ( UnityEngine mats, int propertyIndex ) : MaterialProperty
mats UnityEngine
propertyIndex int
Результат MaterialProperty

GetMaterialProperty() публичный статический Метод

public static GetMaterialProperty ( UnityEngine mats, string name ) : MaterialProperty
mats UnityEngine
name string
Результат MaterialProperty

GetPropertyHeight() публичный Метод

public GetPropertyHeight ( MaterialProperty prop ) : float
prop MaterialProperty
Результат float

GetPropertyHeight() публичный Метод

public GetPropertyHeight ( MaterialProperty prop, string label ) : float
prop MaterialProperty
label string
Результат float

GetRectAfterLabelWidth() публичный статический Метод

public static GetRectAfterLabelWidth ( Rect r ) : Rect
r UnityEngine.Rect
Результат UnityEngine.Rect

GetRightAlignedFieldRect() публичный статический Метод

public static GetRightAlignedFieldRect ( Rect r ) : Rect
r UnityEngine.Rect
Результат UnityEngine.Rect

GetTexturePropertyCustomArea() публичный Метод

public GetTexturePropertyCustomArea ( Rect position ) : Rect
position UnityEngine.Rect
Результат UnityEngine.Rect

HasPreviewGUI() публичный закрытый Метод

public final HasPreviewGUI ( ) : bool
Результат bool

HelpBoxWithButton() публичный Метод

public HelpBoxWithButton ( GUIContent messageContent, GUIContent buttonContent ) : bool
messageContent UnityEngine.GUIContent
buttonContent UnityEngine.GUIContent
Результат bool

LightmapEmissionProperty() публичный Метод

public LightmapEmissionProperty ( ) : void
Результат void

LightmapEmissionProperty() публичный Метод

public LightmapEmissionProperty ( Rect position, int labelIndent ) : void
position UnityEngine.Rect
labelIndent int
Результат void

LightmapEmissionProperty() публичный Метод

public LightmapEmissionProperty ( int labelIndent ) : void
labelIndent int
Результат void

OnDisable() публичный Метод

public OnDisable ( ) : void
Результат void

OnEnable() публичный Метод

public OnEnable ( ) : void
Результат void

OnHeaderGUI() защищенный Метод

protected OnHeaderGUI ( ) : void
Результат void

OnInspectorGUI() публичный Метод

public OnInspectorGUI ( ) : void
Результат void

OnInteractivePreviewGUI() публичный Метод

public OnInteractivePreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect
background UnityEngine.GUIStyle
Результат void

OnPreviewGUI() публичный Метод

public OnPreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect
background UnityEngine.GUIStyle
Результат void

OnPreviewSettings() публичный Метод

public OnPreviewSettings ( ) : void
Результат void

PrepareMaterialPropertiesForAnimationMode() публичный статический Метод

public static PrepareMaterialPropertiesForAnimationMode ( MaterialProperty properties, bool isMaterialEditable ) : Renderer
properties MaterialProperty
isMaterialEditable bool
Результат UnityEngine.Renderer

PropertiesChanged() публичный Метод

public PropertiesChanged ( ) : void
Результат void

PropertiesDefaultGUI() публичный Метод

public PropertiesDefaultGUI ( MaterialProperty props ) : void
props MaterialProperty
Результат void

PropertiesGUI() публичный Метод

public PropertiesGUI ( ) : bool
Результат bool

RangeProperty() публичный Метод

public RangeProperty ( MaterialProperty prop, string label ) : float
prop MaterialProperty
label string
Результат float

RangeProperty() публичный Метод

public RangeProperty ( Rect position, MaterialProperty prop, string label ) : float
position UnityEngine.Rect
prop MaterialProperty
label string
Результат float

RegisterPropertyChangeUndo() публичный Метод

public RegisterPropertyChangeUndo ( string label ) : void
label string
Результат void

RenderStaticPreview() публичный закрытый Метод

public final RenderStaticPreview ( string assetPath, UnityEngine subAssets, int width, int height ) : Texture2D
assetPath string
subAssets UnityEngine
width int
height int
Результат UnityEngine.Texture2D

RequiresConstantRepaint() публичный Метод

public RequiresConstantRepaint ( ) : bool
Результат bool

SetDefaultGUIWidths() публичный Метод

public SetDefaultGUIWidths ( ) : void
Результат void

SetShader() публичный Метод

public SetShader ( Shader shader ) : void
shader UnityEngine.Shader
Результат void

SetShader() публичный Метод

public SetShader ( Shader newShader, bool registerUndo ) : void
newShader UnityEngine.Shader
registerUndo bool
Результат void

ShaderProperty() публичный Метод

public ShaderProperty ( MaterialProperty prop, string label ) : void
prop MaterialProperty
label string
Результат void

ShaderProperty() публичный Метод

public ShaderProperty ( MaterialProperty prop, string label, int labelIndent ) : void
prop MaterialProperty
label string
labelIndent int
Результат void

ShaderProperty() публичный Метод

public ShaderProperty ( Rect position, MaterialProperty prop, string label ) : void
position UnityEngine.Rect
prop MaterialProperty
label string
Результат void

ShaderProperty() публичный Метод

public ShaderProperty ( Rect position, MaterialProperty prop, string label, int labelIndent ) : void
position UnityEngine.Rect
prop MaterialProperty
label string
labelIndent int
Результат void

TextureCompatibilityWarning() публичный Метод

public TextureCompatibilityWarning ( MaterialProperty prop ) : void
prop MaterialProperty
Результат void

TextureProperty() публичный Метод

public TextureProperty ( MaterialProperty prop, string label ) : Texture
prop MaterialProperty
label string
Результат UnityEngine.Texture

TextureProperty() публичный Метод

public TextureProperty ( MaterialProperty prop, string label, bool scaleOffset ) : Texture
prop MaterialProperty
label string
scaleOffset bool
Результат UnityEngine.Texture

TextureProperty() публичный Метод

public TextureProperty ( Rect position, MaterialProperty prop, string label ) : Texture
position UnityEngine.Rect
prop MaterialProperty
label string
Результат UnityEngine.Texture

TextureProperty() публичный Метод

public TextureProperty ( Rect position, MaterialProperty prop, string label, bool scaleOffset ) : Texture
position UnityEngine.Rect
prop MaterialProperty
label string
scaleOffset bool
Результат UnityEngine.Texture

TextureProperty() публичный Метод

public TextureProperty ( Rect position, MaterialProperty prop, string label, string tooltip, bool scaleOffset ) : Texture
position UnityEngine.Rect
prop MaterialProperty
label string
tooltip string
scaleOffset bool
Результат UnityEngine.Texture

TexturePropertyMiniThumbnail() публичный Метод

public TexturePropertyMiniThumbnail ( Rect position, MaterialProperty prop, string label, string tooltip ) : Texture
position UnityEngine.Rect
prop MaterialProperty
label string
tooltip string
Результат UnityEngine.Texture

TexturePropertySingleLine() публичный Метод

public TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
Результат UnityEngine.Rect

TexturePropertySingleLine() публичный Метод

public TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1 ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
extraProperty1 MaterialProperty
Результат UnityEngine.Rect

TexturePropertySingleLine() публичный Метод

public TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1, MaterialProperty extraProperty2 ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
extraProperty1 MaterialProperty
extraProperty2 MaterialProperty
Результат UnityEngine.Rect

TexturePropertyTwoLines() публичный Метод

public TexturePropertyTwoLines ( GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1, GUIContent label2, MaterialProperty extraProperty2 ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
extraProperty1 MaterialProperty
label2 UnityEngine.GUIContent
extraProperty2 MaterialProperty
Результат UnityEngine.Rect

TexturePropertyWithHDRColor() публичный Метод

public TexturePropertyWithHDRColor ( GUIContent label, MaterialProperty textureProp, MaterialProperty colorProperty, ColorPickerHDRConfig hdrConfig, bool showAlpha ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
colorProperty MaterialProperty
hdrConfig ColorPickerHDRConfig
showAlpha bool
Результат UnityEngine.Rect

TextureScaleOffsetProperty() публичный статический Метод

public static TextureScaleOffsetProperty ( Rect position, Vector4 scaleOffset ) : Vector4
position UnityEngine.Rect
scaleOffset Vector4
Результат Vector4

TextureScaleOffsetProperty() публичный статический Метод

public static TextureScaleOffsetProperty ( Rect position, Vector4 scaleOffset, bool partOfTexturePropertyControl ) : Vector4
position UnityEngine.Rect
scaleOffset Vector4
partOfTexturePropertyControl bool
Результат Vector4

TextureScaleOffsetProperty() публичный Метод

public TextureScaleOffsetProperty ( Rect position, MaterialProperty property ) : float
position UnityEngine.Rect
property MaterialProperty
Результат float

TextureScaleOffsetProperty() публичный Метод

public TextureScaleOffsetProperty ( Rect position, MaterialProperty property, bool partOfTexturePropertyControl ) : float
position UnityEngine.Rect
property MaterialProperty
partOfTexturePropertyControl bool
Результат float

TextureScaleOffsetProperty() публичный Метод

public TextureScaleOffsetProperty ( MaterialProperty property ) : void
property MaterialProperty
Результат void

UndoRedoPerformed() публичный Метод

public UndoRedoPerformed ( ) : void
Результат void

VectorProperty() публичный Метод

public VectorProperty ( MaterialProperty prop, string label ) : Vector4
prop MaterialProperty
label string
Результат Vector4

VectorProperty() публичный Метод

public VectorProperty ( Rect position, MaterialProperty prop, string label ) : Vector4
position UnityEngine.Rect
prop MaterialProperty
label string
Результат Vector4