MaterialEditor

class in UnityEditor

/

Hereda de:Editor

Cambiar al Manual

Descripción

El Unity Material Editor (Editor de Materiales).

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

Variables Estáticas

kMiniTextureFieldLabelIndentLevelÚtil para sangrar las propiedades shader que necesitan la misma sangría que el campo de mini textura.

Variables

isVisibleEl material actual está expandido.

Funciones Públicas

AwakeLlamado cuando el Editor se despierta.
BeginAnimatedCheckCreates a Property wrapper, useful for making regular GUI controls work with MaterialProperty.
ColorPropertyDibuja un campo de propiedad para una propiedad shader de color.
DefaultPreviewGUIManejo predeterminado del área de pre-visualización para los materiales.
DefaultPreviewSettingsGUILa barra de herramientas por defecto para el área de pre-visualización del material.
DefaultShaderPropertyManeja la interfaz de usuario para una propiedad shader que ignora cualquier dibujador personalizado.
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.
FloatPropertyDibuja un campo de propiedad para una propiedad shader float.
GetPropertyHeightCalcula la altura necesitada para la propiedad.
GetTexturePropertyCustomAreaDevuelve el rect libre debajo de la etiqueta y antes del campo del objeto grande del pulgar. Se utiliza para, p. Mosaicos y propiedades de desplazamiento.
HasPreviewGUISe puede previsualizar este componente en su estado actual?
HelpBoxWithButtoncree una caja de ayuda con un mensaje y un botón. Devuelve true si se presiona el botón.
IsInstancingEnabledDetermines whether the Enable Instancing checkbox is checked.
LightmapEmissionFlagsPropertyDraws the UI for setting the global illumination flag of a material.
LightmapEmissionPropertyEsta función dibujará el UI para la propiedad emission del lightmap. (None, Realtime, baked)See Also: MaterialLightmapFlags.
OnDisableLlamado cuando el editor está desactivado, si se anula por favor llame el OnDisable() base para asegurarse que el inspector de material esté configurado apropiadamente.
OnEnableLlamado cuando el editor está habilitado, si se anula por favor llame el OnEnable() base para asegurarse que el inspector de material está configurado apropiadamente.
OnInspectorGUIImplemente código específico del GUI MaterialEditor aquí. Si usted quiere extender simplemente el editor existente llame el método OnInspectorGUI () base al hacer cualquier código GUI personalizado.
OnPreviewGUICustom preview for Image component.
PropertiesChangedCuando una propiedad material cambie llame esta función. Esto re-construirá el inspector y valida las propiedades.
PropertiesDefaultGUIEl rendering de propiedades shader.
PropertiesGUIRenderizá las propiedades de material estándar. Este método va a renderizar propiedades utilizando una instancia IShaderGUI si se encuentra, de lo contrario utiliza PropertiesDefaultGUI.
RangePropertyDibuja un control deslizante de rango para una propiedad shader de rango.
RegisterPropertyChangeUndoLlame esto cuando usted cambie la propiedad material. Agregará un undo a la acción.
RenderQueueFieldDisplay UI for editing material's render queue setting.
RequiresConstantRepaintEsta edición requiere que sea re-pintada constantemente en su estado actual?
SetDefaultGUIWidthsDefine EditorGUIUtility.fieldWidth y labelWidth a los valores predeterminados que PropertiesGUI utiliza.
SetShaderDefina el shader del material.
ShaderPropertyManeja el UI para una propiedad shader.
TextureCompatibilityWarningComprueba si una propiedad en particular tiene un tipo de textura incorrecto especificado por el material, muestra una advertencia adecuada y sugiere al usuario que corrija automáticamente el problema.
TexturePropertyDibuja un campo de propiedad para una propiedad shader de textura.
TexturePropertyMiniThumbnailDibuja un campo de propiedad para una propiedad shader de textura que sólo ocupa una sola altura de línea.
TexturePropertySingleLineMétodo para mostrar el control de propiedad de textura con propiedades en linea adicionales.
TexturePropertyTwoLinesMétodo para mostrar un diseño compacto de propiedades.
TexturePropertyWithHDRColorMétodo para mostrar una propiedad de control de textura con un campo HDR de color y su campo float de color de brillo.
TextureScaleOffsetPropertyDibuja propiedades de mosaico y desplazamiento para una textura.
VectorPropertyDibuja un campo de propiedad para una propiedad vector shader.

Funciones Protegidas

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

Funciones Estáticas

ApplyMaterialPropertyDrawersAplica unos valores MaterialPropertyDrawer iniciales.
FixupEmissiveFlagReturns a properly set global illlumination flag based on the passed in flag and the given color.
GetDefaultPropertyHeightCalcula la altura necesitada para la propiedad, ignorando los cajones personalizados.
GetFlexibleRectBetweenFieldAndRightEdgeMétodo de utilidad para el diseño GUI de ShaderGUI. Utilizado e.g para el rect después de un campo de color izquierdo alineado.
GetFlexibleRectBetweenLabelAndFieldMétodo de utilidad para el diseño GUI de ShaderGUI.
GetLeftAlignedFieldRectMétodo de utilidad para el diseño GUI de ShaderGUI.
GetMaterialPropertiesObtiene información de propiedades shader de los materiales pasados.
GetMaterialPropertyObtiene información sobre una propiedad shader única.
GetRectAfterLabelWidthMétodo de utilidad para el diseño GUI del ShaderGUI. Este es el rect después de la etiqueta que se puede utilizar para varias propiedades. El rect de entrada se puede obtener llamando a: EditorGUILayout.GetControlRect.
GetRightAlignedFieldRectMétodo de utilidad para el diseño GUI de ShaderGUI.

Miembros heredados

Variables

serializedObjectUn SerializedObject representando el objeto u objetos siendo inspeccionados.
targetEl objeto siendo inspeccionado.
targetsUn arreglo de todos los objetos siendo inspeccionados.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameEl nombre del objeto.

Funciones Públicas

DrawDefaultInspectorDraws the built-in inspector.
DrawHeaderLlame esta función para dibujar el encabezado del editor.
DrawPreviewEl primer punto de entrada para Preview Drawing.
GetInfoStringImplemente este método para mostrar información asset encima de la pre-visualización del asset.
GetPreviewTitleAnule este método si desea cambiar la etiqueta del área de vista previa.
OnInteractivePreviewGUIImplemente para crear su propia vista previa personalizada interactiva. Las vistas previas interactivas personalizadas se utilizan en el área de vista previa del inspector y el selector de objetos.
OnPreviewSettingsAnule este método si desea mostrar controles personalizados en el encabezado de la vista previa.
RenderStaticPreviewOverride this method if you want to render a static preview.
RepaintRedraw any inspectors that shows this editor.
UseDefaultMarginsAnule este método en subclases para devolver false si no desea márgenes predeterminados.
GetInstanceIDDevuelve el id de la instancia del objeto.
ToStringReturns the name of the object.

Funciones Protegidas

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

Funciones Estáticas

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.
CreateEditorCrea un editor personalizado para targetObject o targetObjects.
CreateEditorWithContextMake a custom editor for targetObject or targetObjects with a context object.
DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeDevuelve el primer objeto activo cargado de tipo type.
FindObjectsOfTypeDevuelve una lista de todos los objetos activos cargados de tipo type.
InstantiateClona el objeto original y devuelve el clon.
CreateInstanceCrea una instancia de un objeto scriptable.

Operadores

bool¿Existe el objeto?
operator !=Compare si dos objetos se refieren a un objeto diferente.
operator ==Compara dos referencias de objeto para ver si se refieren al mismo objeto.

Mensajes

OnSceneGUIEnables the Editor to handle an event in the Scene view.
OnDestroyEsta función se llama cuando el objeto scriptable se destruirá.

Events

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