The Unity Material Editor.
Extend this class to write your own custom material editor. For more detailed information see the Custom Material Editor section of the ShaderLab reference.
kMiniTextureFieldLabelIndentLevel | Useful for indenting shader properties that need the same indent as mini texture field. |
isVisible | Is the current material expanded. |
Awake | Called when the Editor is woken up. |
ColorProperty | Draw a property field for a color shader property. |
DefaultPreviewGUI | Default handling of preview area for materials. |
DefaultPreviewSettingsGUI | Default toolbar for material preview area. |
DefaultShaderProperty | Handles UI for one shader property ignoring any custom drawers. |
FloatProperty | Draw a property field for a float shader property. |
GetPropertyHeight | Calculate height needed for the property. |
GetTexturePropertyCustomArea | Returns the free rect below the label and before the large thumb object field. Is used for e.g. tiling and offset properties. |
HasPreviewGUI | Can this component be Previewed in its current state? |
HelpBoxWithButton | Make a help box with a message and button. Returns true, if button was pressed. |
LightmapEmissionProperty | This function will draw the UI for the lightmap emission property. (None, Realtime, baked)See Also: MaterialLightmapFlags. |
OnDisable | Called when the editor is disabled, if overridden please call the base OnDisable() to ensure that the material inspector is set up properly. |
OnEnable | Called when the editor is enabled, if overridden please call the base OnEnable() to ensure that the material inspector is set up properly. |
OnInspectorGUI | Implement specific MaterialEditor GUI code here. If you want to simply extend the existing editor call the base OnInspectorGUI () before doing any custom GUI code. |
OnPreviewGUI | Custom preview for Image component. |
PropertiesChanged | Whenever a material property is changed call this function. This will rebuild the inspector and validate the properties. |
PropertiesDefaultGUI | Default rendering of shader properties. |
PropertiesGUI | Render the standard material properties. This method will either render properties using a IShaderGUI instance if found otherwise it uses PropertiesDefaultGUI. |
RangeProperty | Draw a range slider for a range shader property. |
RegisterPropertyChangeUndo | Call this when you change a material property. It will add an undo for the action. |
RequiresConstantRepaint | Does this edit require to be repainted constantly in its current state? |
SetDefaultGUIWidths | Set EditorGUIUtility.fieldWidth and labelWidth to the default values that PropertiesGUI uses. |
SetShader | Set the shader of the material. |
ShaderProperty | Handes UI for one shader property. |
TextureCompatibilityWarning | Checks if particular property has incorrect type of texture specified by the material, displays appropriate warning and suggests the user to automatically fix the problem. |
TextureProperty | Draw a property field for a texture shader property. |
TexturePropertyMiniThumbnail | Draw a property field for a texture shader property that only takes up a single line height. |
TexturePropertySingleLine | Method for showing a texture property control with additional inlined properites. |
TexturePropertyTwoLines | Method for showing a compact layout of properties. |
TexturePropertyWithHDRColor | Method for showing a texture property control with a HDR color field and its color brightness float field. |
TextureScaleOffsetProperty | Draws tiling and offset properties for a texture. |
VectorProperty | Draw a property field for a vector shader property. |
ApplyMaterialPropertyDrawers | Apply initial MaterialPropertyDrawer values. |
GetDefaultPropertyHeight | Calculate height needed for the property, ignoring custom drawers. |
GetFlexibleRectBetweenFieldAndRightEdge | Utility method for GUI layouting ShaderGUI. Used e.g for the rect after a left aligned Color field. |
GetFlexibleRectBetweenLabelAndField | Utility method for GUI layouting ShaderGUI. |
GetLeftAlignedFieldRect | Utility method for GUI layouting ShaderGUI. |
GetMaterialProperties | Get shader property information of the passed materials. |
GetMaterialProperty | Get information about a single shader property. |
GetRectAfterLabelWidth | Utility method for GUI layouting ShaderGUI. This is the rect after the label which can be used for multiple properties. The input rect can be fetched by calling: EditorGUILayout.GetControlRect. |
GetRightAlignedFieldRect | Utility method for GUI layouting ShaderGUI. |
serializedObject | A SerializedObject representing the object or objects being inspected. |
target | The object being inspected. |
targets | An array of all the object being inspected. |
hideFlags | Should the object be hidden, saved with the scene or modifiable by the user? |
name | The name of the object. |
DrawDefaultInspector | Draw the built-in inspector. |
DrawHeader | Call this function to draw the header of the editor. |
DrawPreview | The first entry point for Preview Drawing. |
GetInfoString | Implement this method to show asset information on top of the asset preview. |
GetPreviewTitle | Override this method if you want to change the label of the Preview area. |
OnInteractivePreviewGUI | Implement to create your own interactive custom preview. Interactive custom previews are used in the preview area of the inspector and the object selector. |
OnPreviewSettings | Override this method if you want to show custom controls in the preview header. |
RenderStaticPreview | Override this method if you want to render a static preview that shows. |
Repaint | Repaint any inspectors that shows this editor. |
UseDefaultMargins | Override this method in subclasses to return false if you don't want default margins. |
GetInstanceID | Returns the instance id of the object. |
ToString | Returns the name of the game object. |
CreateCachedEditor | On 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. |
CreateEditor | Make a custom editor for targetObject or targetObjects. |
Destroy | Removes a gameobject, component or asset. |
DestroyImmediate | Destroys the object obj immediately. |
DontDestroyOnLoad | Makes the object target not be destroyed automatically when loading a new scene. |
FindObjectOfType | Returns the first active loaded object of Type type. |
FindObjectsOfType | Returns a list of all active loaded objects of Type type. |
Instantiate | Returns a copy of the object original. |
CreateInstance | Creates an instance of a scriptable object. |
bool | Does the object exist? |
operator != | Compares if two objects refer to a different object. |
operator == | Compares two object references to see if they refer to the same object. |
OnSceneGUI | Enables the Editor to handle an event in the scene view. |
OnDestroy | This function is called when the scriptable object will be destroyed. |