C# Класс UnityEditor.Editor

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

Private Properties

Свойство Тип Описание
CanBeExpandedViaAFoldout bool
CleanupPropertyEditor void
CreateEditor Editor
DoDrawDefaultInspector bool
DoDrawDefaultInspector bool
DrawHeaderFromInsideHierarchy void
DrawHeaderGUI UnityEngine.Rect
DrawHeaderGUI UnityEngine.Rect
DrawHeaderHelpAndSettingsGUI void
GetOptimizedGUIBlock bool
GetOptimizedGUIBlockImplementation bool
GetSerializedObjectInternal SerializedObject
InternalSetHidden void
InternalSetTargets void
IsAppropriateFileOpenForEdit bool
IsAppropriateFileOpenForEdit bool
IsEnabled bool
IsOpenForEdit bool
IsOpenForEdit bool
OnAssetStoreInspectorGUI void
OnDisableINTERNAL void
OnForceReloadInspector void
OnHeaderControlsGUI void
OnHeaderIconGUI void
OnHeaderTitleGUI void
OnOptimizedInspectorGUI bool
OptimizedInspectorGUIImplementation bool

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

Метод Описание
CreateCachedEditor ( Object targetObject, Type editorType, Editor &previousEditor ) : void
CreateEditor ( Object targetObject, [ editorType ) : Editor

Make a custom editor for targetObject or targetObjects.

DrawDefaultInspector ( ) : bool

Draw the built-in inspector.

DrawHeader ( ) : void

Call this function to draw the header of the editor.

DrawPreview ( Rect previewArea ) : void

The first entry point for Preview Drawing.

GetInfoString ( ) : string

Implement this method to show asset information on top of the asset preview.

GetPreviewTitle ( ) : GUIContent

Override this method if you want to change the label of the Preview area.

HasPreviewGUI ( ) : bool

Override this method in subclasses if you implement OnPreviewGUI.

Initialize ( Object targets ) : void
MoveNextTarget ( ) : bool
OnInspectorGUI ( ) : void

Implement this function to make a custom inspector.

OnInteractivePreviewGUI ( Rect r, GUIStyle background ) : void

Implement to create your own interactive custom preview. Interactive custom previews are used in the preview area of the inspector and the object selector.

OnPreviewGUI ( Rect r, GUIStyle background ) : void

Implement to create your own custom preview for the preview area of the inspector, primary editor headers and the object selector.

OnPreviewSettings ( ) : void

Override this method if you want to show custom controls in the preview header.

ReloadPreviewInstances ( ) : void
RenderStaticPreview ( string assetPath, Object subAssets, int width, int height ) : Texture2D

Override this method if you want to render a static preview that shows.

Repaint ( ) : void

Repaint any inspectors that shows this editor.

RequiresConstantRepaint ( ) : bool

Does this edit require to be repainted constantly in its current state?

ResetTarget ( ) : void
UseDefaultMargins ( ) : bool

Override this method in subclasses to return false if you don't want default margins.

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

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

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

Метод Описание
CanBeExpandedViaAFoldout ( ) : bool
CleanupPropertyEditor ( ) : void
CreateEditor ( Object targetObject ) : Editor
DoDrawDefaultInspector ( ) : bool
DoDrawDefaultInspector ( SerializedObject obj ) : bool
DrawHeaderFromInsideHierarchy ( ) : void
DrawHeaderGUI ( Editor editor, string header ) : Rect
DrawHeaderGUI ( Editor editor, string header, float leftMargin ) : Rect
DrawHeaderHelpAndSettingsGUI ( Rect r ) : void
GetOptimizedGUIBlock ( bool isDirty, bool isVisible, OptimizedGUIBlock &block, float &height ) : bool
GetOptimizedGUIBlockImplementation ( bool isDirty, bool isVisible, OptimizedGUIBlock &block, float &height ) : bool
GetSerializedObjectInternal ( ) : SerializedObject
InternalSetHidden ( bool hidden ) : void
InternalSetTargets ( Object t ) : void
IsAppropriateFileOpenForEdit ( Object assetObject ) : bool
IsAppropriateFileOpenForEdit ( Object assetObject, string &message ) : bool
IsEnabled ( ) : bool
IsOpenForEdit ( ) : bool
IsOpenForEdit ( string &message ) : bool
OnAssetStoreInspectorGUI ( ) : void
OnDisableINTERNAL ( ) : void
OnForceReloadInspector ( ) : void
OnHeaderControlsGUI ( ) : void
OnHeaderIconGUI ( Rect iconRect ) : void
OnHeaderTitleGUI ( Rect titleRect, string header ) : void
OnOptimizedInspectorGUI ( Rect contentRect ) : bool
OptimizedInspectorGUIImplementation ( Rect contentRect ) : bool

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

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

public static CreateCachedEditor ( Object targetObject, Type editorType, Editor &previousEditor ) : void
targetObject Object
editorType System.Type
previousEditor Editor
Результат void

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

Make a custom editor for targetObject or targetObjects.

public static CreateEditor ( Object targetObject, [ editorType ) : Editor
targetObject Object
editorType [
Результат Editor

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

Draw the built-in inspector.

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

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

Call this function to draw the header of the editor.

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

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

The first entry point for Preview Drawing.

public DrawPreview ( Rect previewArea ) : void
previewArea UnityEngine.Rect
Результат void

DrawPropertiesExcluding() защищенный статический Метод

protected static DrawPropertiesExcluding ( SerializedObject obj ) : void
obj SerializedObject
Результат void

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

Implement this method to show asset information on top of the asset preview.

public GetInfoString ( ) : string
Результат string

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

Override this method if you want to change the label of the Preview area.

public GetPreviewTitle ( ) : GUIContent
Результат UnityEngine.GUIContent

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

Override this method in subclasses if you implement OnPreviewGUI.

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

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

public Initialize ( Object targets ) : void
targets Object
Результат void

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

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

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

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

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

Implement this function to make a custom inspector.

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

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.

public OnInteractivePreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect Rectangle in which to draw the preview.
background UnityEngine.GUIStyle Background image.
Результат void

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

Implement to create your own custom preview for the preview area of the inspector, primary editor headers and the object selector.

public OnPreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect Rectangle in which to draw the preview.
background UnityEngine.GUIStyle Background image.
Результат void

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

Override this method if you want to show custom controls in the preview header.

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

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

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

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

Override this method if you want to render a static preview that shows.

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

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

Repaint any inspectors that shows this editor.

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

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

Does this edit require to be repainted constantly in its current state?

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

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

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

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

Override this method in subclasses to return false if you don't want default margins.

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