Version: 2019.1

ImageEditor

class in UnityEditor.UI

/

Inherits from:UI.GraphicEditor

Switch to Manual

Description

Custom Editor for the Image Component.

Extend this class to write a custom editor for an Image-derived component. See Also: Editor, CustomEditor.

Public Functions

GetInfoStringA string cointaining the Image details to be used as a overlay on the component Preview.
HasPreviewGUIМожет ли этот компонент быть предпросмотрен в своем текущем состоянии?
OnInspectorGUIImplement specific ImageEditor inspector GUI code here. If you want to simply extend the existing editor call the base OnInspectorGUI () before doing any custom GUI code.
OnPreviewGUICustom preview for Image component.

Protected Functions

OnDisableСм. MonoBehaviour.OnDisable.
SpriteGUIGUI for showing the Sprite property.
TypeGUIGUI for showing the image type and associated settings.

Inherited members

Variables

serializedObject SerializedObject, представляющий инспектируемый объект или объекты.
targetИнспектируемый объект.
targetsМассив всех инспектируемых объектов.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public Functions

DrawDefaultInspectorDraws the built-in inspector.
DrawHeaderRedraw any inspectors that shows this editor.
DrawPreviewЭто первая входная точка для рисования области предпросмотра.
GetPreviewTitleПереопределите этот метод, если вы хотите изменить название области предпросмотра (preview).
OnInteractivePreviewGUIРеализуйте, чтобы создать ваш собственный интерактивный предпросмотр. Интерактивные предпросмотры используются в области предпросмотра окна Inspector и при выборе объекта.
OnPreviewSettingsПереопределите этот метод, если вы хотите показать пользовательские элементы в заголовке предпросмотра.
RenderStaticPreviewOverride this method if you want to render a static preview.
RepaintПерерисовывает все инспекторы, которые отображает этот редактор.
RequiresConstantRepaintDoes this edit require to be repainted constantly in its current state?
UseDefaultMarginsПереопределите этот метод в подклассах и возвращайте false, если вы не хотите отступы по умолчанию.
GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the GameObject.

Protected Functions

ShouldHideOpenButtonReturns the visibility setting of the "open" button in the Inspector.
AppearanceControlsGUIGUI related to the appearance of the graphic. Color and Material properties appear here.
NativeSizeButtonGUIGUI for showing a button that sets the size of the RectTransform to the native size for this Graphic.
RaycastControlsGUIGUI related to the Raycasting settings for the graphic.
SetShowNativeSizeSet if the 'Set Native Size' button should be visible for this editor.

Static Functions

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Создает пользовательский редактор для obj или objects.
CreateEditorWithContextMake a custom editor for targetObject or targetObjects with a context object.
DestroyУдаляет GameObject, Component или 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.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateClones the object original and returns the clone.
CreateInstanceCreates an instance of a scriptable object.

Operators

boolDoes 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.

Messages

OnSceneGUIEnables the Editor to handle an event in the Scene view.
AwakeThis function is called when the ScriptableObject script is started.
OnDestroyThis function is called when the scriptable object will be destroyed.
OnEnableThis function is called when the object is loaded.

Events

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