C# Class UnityEditor.MaterialEditor

Inheritance: Editor
Afficher le fichier Open project: randomize/VimConfig Class Usage Examples

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
OnHeaderGUI ( ) : void

Private Methods

Méthode Description
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

Method Details

ApplyMaterialPropertyDrawers() public static méthode

public static ApplyMaterialPropertyDrawers ( Material material ) : void
material UnityEngine.Material
Résultat void

ApplyMaterialPropertyDrawers() public static méthode

public static ApplyMaterialPropertyDrawers ( UnityEngine targets ) : void
targets UnityEngine
Résultat void

Awake() public méthode

public Awake ( ) : void
Résultat void

BeginAnimatedCheck() public méthode

public BeginAnimatedCheck ( MaterialProperty prop ) : void
prop MaterialProperty
Résultat void

ColorProperty() public méthode

public ColorProperty ( MaterialProperty prop, string label ) : Color
prop MaterialProperty
label string
Résultat Color

ColorProperty() public méthode

public ColorProperty ( Rect position, MaterialProperty prop, string label ) : Color
position UnityEngine.Rect
prop MaterialProperty
label string
Résultat Color

DefaultPreviewGUI() public méthode

public DefaultPreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect
background UnityEngine.GUIStyle
Résultat void

DefaultPreviewSettingsGUI() public méthode

public DefaultPreviewSettingsGUI ( ) : void
Résultat void

DefaultShaderProperty() public méthode

public DefaultShaderProperty ( MaterialProperty prop, string label ) : void
prop MaterialProperty
label string
Résultat void

DefaultShaderProperty() public méthode

public DefaultShaderProperty ( Rect position, MaterialProperty prop, string label ) : void
position UnityEngine.Rect
prop MaterialProperty
label string
Résultat void

EndAnimatedCheck() public méthode

public EndAnimatedCheck ( ) : void
Résultat void

FloatProperty() public méthode

public FloatProperty ( MaterialProperty prop, string label ) : float
prop MaterialProperty
label string
Résultat float

FloatProperty() public méthode

public FloatProperty ( Rect position, MaterialProperty prop, string label ) : float
position UnityEngine.Rect
prop MaterialProperty
label string
Résultat float

GetDefaultPropertyHeight() public static méthode

public static GetDefaultPropertyHeight ( MaterialProperty prop ) : float
prop MaterialProperty
Résultat float

GetFlexibleRectBetweenFieldAndRightEdge() public static méthode

public static GetFlexibleRectBetweenFieldAndRightEdge ( Rect r ) : Rect
r UnityEngine.Rect
Résultat UnityEngine.Rect

GetFlexibleRectBetweenLabelAndField() public static méthode

public static GetFlexibleRectBetweenLabelAndField ( Rect r ) : Rect
r UnityEngine.Rect
Résultat UnityEngine.Rect

GetLeftAlignedFieldRect() public static méthode

public static GetLeftAlignedFieldRect ( Rect r ) : Rect
r UnityEngine.Rect
Résultat UnityEngine.Rect

GetMaterialProperties() public static méthode

public static GetMaterialProperties ( UnityEngine mats ) : UnityEditor.MaterialProperty[]
mats UnityEngine
Résultat UnityEditor.MaterialProperty[]

GetMaterialProperty() public static méthode

public static GetMaterialProperty ( UnityEngine mats, int propertyIndex ) : MaterialProperty
mats UnityEngine
propertyIndex int
Résultat MaterialProperty

GetMaterialProperty() public static méthode

public static GetMaterialProperty ( UnityEngine mats, string name ) : MaterialProperty
mats UnityEngine
name string
Résultat MaterialProperty

GetPropertyHeight() public méthode

public GetPropertyHeight ( MaterialProperty prop ) : float
prop MaterialProperty
Résultat float

GetPropertyHeight() public méthode

public GetPropertyHeight ( MaterialProperty prop, string label ) : float
prop MaterialProperty
label string
Résultat float

GetRectAfterLabelWidth() public static méthode

public static GetRectAfterLabelWidth ( Rect r ) : Rect
r UnityEngine.Rect
Résultat UnityEngine.Rect

GetRightAlignedFieldRect() public static méthode

public static GetRightAlignedFieldRect ( Rect r ) : Rect
r UnityEngine.Rect
Résultat UnityEngine.Rect

GetTexturePropertyCustomArea() public méthode

public GetTexturePropertyCustomArea ( Rect position ) : Rect
position UnityEngine.Rect
Résultat UnityEngine.Rect

HasPreviewGUI() public final méthode

public final HasPreviewGUI ( ) : bool
Résultat bool

HelpBoxWithButton() public méthode

public HelpBoxWithButton ( GUIContent messageContent, GUIContent buttonContent ) : bool
messageContent UnityEngine.GUIContent
buttonContent UnityEngine.GUIContent
Résultat bool

LightmapEmissionProperty() public méthode

public LightmapEmissionProperty ( ) : void
Résultat void

LightmapEmissionProperty() public méthode

public LightmapEmissionProperty ( Rect position, int labelIndent ) : void
position UnityEngine.Rect
labelIndent int
Résultat void

LightmapEmissionProperty() public méthode

public LightmapEmissionProperty ( int labelIndent ) : void
labelIndent int
Résultat void

OnDisable() public méthode

public OnDisable ( ) : void
Résultat void

OnEnable() public méthode

public OnEnable ( ) : void
Résultat void

OnHeaderGUI() protected méthode

protected OnHeaderGUI ( ) : void
Résultat void

OnInspectorGUI() public méthode

public OnInspectorGUI ( ) : void
Résultat void

OnInteractivePreviewGUI() public méthode

public OnInteractivePreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect
background UnityEngine.GUIStyle
Résultat void

OnPreviewGUI() public méthode

public OnPreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect
background UnityEngine.GUIStyle
Résultat void

OnPreviewSettings() public méthode

public OnPreviewSettings ( ) : void
Résultat void

PrepareMaterialPropertiesForAnimationMode() public static méthode

public static PrepareMaterialPropertiesForAnimationMode ( MaterialProperty properties, bool isMaterialEditable ) : Renderer
properties MaterialProperty
isMaterialEditable bool
Résultat UnityEngine.Renderer

PropertiesChanged() public méthode

public PropertiesChanged ( ) : void
Résultat void

PropertiesDefaultGUI() public méthode

public PropertiesDefaultGUI ( MaterialProperty props ) : void
props MaterialProperty
Résultat void

PropertiesGUI() public méthode

public PropertiesGUI ( ) : bool
Résultat bool

RangeProperty() public méthode

public RangeProperty ( MaterialProperty prop, string label ) : float
prop MaterialProperty
label string
Résultat float

RangeProperty() public méthode

public RangeProperty ( Rect position, MaterialProperty prop, string label ) : float
position UnityEngine.Rect
prop MaterialProperty
label string
Résultat float

RegisterPropertyChangeUndo() public méthode

public RegisterPropertyChangeUndo ( string label ) : void
label string
Résultat void

RenderStaticPreview() public final méthode

public final RenderStaticPreview ( string assetPath, UnityEngine subAssets, int width, int height ) : Texture2D
assetPath string
subAssets UnityEngine
width int
height int
Résultat UnityEngine.Texture2D

RequiresConstantRepaint() public méthode

public RequiresConstantRepaint ( ) : bool
Résultat bool

SetDefaultGUIWidths() public méthode

public SetDefaultGUIWidths ( ) : void
Résultat void

SetShader() public méthode

public SetShader ( Shader shader ) : void
shader UnityEngine.Shader
Résultat void

SetShader() public méthode

public SetShader ( Shader newShader, bool registerUndo ) : void
newShader UnityEngine.Shader
registerUndo bool
Résultat void

ShaderProperty() public méthode

public ShaderProperty ( MaterialProperty prop, string label ) : void
prop MaterialProperty
label string
Résultat void

ShaderProperty() public méthode

public ShaderProperty ( MaterialProperty prop, string label, int labelIndent ) : void
prop MaterialProperty
label string
labelIndent int
Résultat void

ShaderProperty() public méthode

public ShaderProperty ( Rect position, MaterialProperty prop, string label ) : void
position UnityEngine.Rect
prop MaterialProperty
label string
Résultat void

ShaderProperty() public méthode

public ShaderProperty ( Rect position, MaterialProperty prop, string label, int labelIndent ) : void
position UnityEngine.Rect
prop MaterialProperty
label string
labelIndent int
Résultat void

TextureCompatibilityWarning() public méthode

public TextureCompatibilityWarning ( MaterialProperty prop ) : void
prop MaterialProperty
Résultat void

TextureProperty() public méthode

public TextureProperty ( MaterialProperty prop, string label ) : Texture
prop MaterialProperty
label string
Résultat UnityEngine.Texture

TextureProperty() public méthode

public TextureProperty ( MaterialProperty prop, string label, bool scaleOffset ) : Texture
prop MaterialProperty
label string
scaleOffset bool
Résultat UnityEngine.Texture

TextureProperty() public méthode

public TextureProperty ( Rect position, MaterialProperty prop, string label ) : Texture
position UnityEngine.Rect
prop MaterialProperty
label string
Résultat UnityEngine.Texture

TextureProperty() public méthode

public TextureProperty ( Rect position, MaterialProperty prop, string label, bool scaleOffset ) : Texture
position UnityEngine.Rect
prop MaterialProperty
label string
scaleOffset bool
Résultat UnityEngine.Texture

TextureProperty() public méthode

public TextureProperty ( Rect position, MaterialProperty prop, string label, string tooltip, bool scaleOffset ) : Texture
position UnityEngine.Rect
prop MaterialProperty
label string
tooltip string
scaleOffset bool
Résultat UnityEngine.Texture

TexturePropertyMiniThumbnail() public méthode

public TexturePropertyMiniThumbnail ( Rect position, MaterialProperty prop, string label, string tooltip ) : Texture
position UnityEngine.Rect
prop MaterialProperty
label string
tooltip string
Résultat UnityEngine.Texture

TexturePropertySingleLine() public méthode

public TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
Résultat UnityEngine.Rect

TexturePropertySingleLine() public méthode

public TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1 ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
extraProperty1 MaterialProperty
Résultat UnityEngine.Rect

TexturePropertySingleLine() public méthode

public TexturePropertySingleLine ( GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1, MaterialProperty extraProperty2 ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
extraProperty1 MaterialProperty
extraProperty2 MaterialProperty
Résultat UnityEngine.Rect

TexturePropertyTwoLines() public méthode

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
Résultat UnityEngine.Rect

TexturePropertyWithHDRColor() public méthode

public TexturePropertyWithHDRColor ( GUIContent label, MaterialProperty textureProp, MaterialProperty colorProperty, ColorPickerHDRConfig hdrConfig, bool showAlpha ) : Rect
label UnityEngine.GUIContent
textureProp MaterialProperty
colorProperty MaterialProperty
hdrConfig ColorPickerHDRConfig
showAlpha bool
Résultat UnityEngine.Rect

TextureScaleOffsetProperty() public static méthode

public static TextureScaleOffsetProperty ( Rect position, Vector4 scaleOffset ) : Vector4
position UnityEngine.Rect
scaleOffset Vector4
Résultat Vector4

TextureScaleOffsetProperty() public static méthode

public static TextureScaleOffsetProperty ( Rect position, Vector4 scaleOffset, bool partOfTexturePropertyControl ) : Vector4
position UnityEngine.Rect
scaleOffset Vector4
partOfTexturePropertyControl bool
Résultat Vector4

TextureScaleOffsetProperty() public méthode

public TextureScaleOffsetProperty ( Rect position, MaterialProperty property ) : float
position UnityEngine.Rect
property MaterialProperty
Résultat float

TextureScaleOffsetProperty() public méthode

public TextureScaleOffsetProperty ( Rect position, MaterialProperty property, bool partOfTexturePropertyControl ) : float
position UnityEngine.Rect
property MaterialProperty
partOfTexturePropertyControl bool
Résultat float

TextureScaleOffsetProperty() public méthode

public TextureScaleOffsetProperty ( MaterialProperty property ) : void
property MaterialProperty
Résultat void

UndoRedoPerformed() public méthode

public UndoRedoPerformed ( ) : void
Résultat void

VectorProperty() public méthode

public VectorProperty ( MaterialProperty prop, string label ) : Vector4
prop MaterialProperty
label string
Résultat Vector4

VectorProperty() public méthode

public VectorProperty ( Rect position, MaterialProperty prop, string label ) : Vector4
position UnityEngine.Rect
prop MaterialProperty
label string
Résultat Vector4