C# Class UnityEditor.Editor

Inheritance: UnityEngine.ScriptableObject, IPreviewable
ファイルを表示 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Private Properties

Property Type Description
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

Public Methods

Method Description
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.

Protected Methods

Method Description
DrawPropertiesExcluding ( SerializedObject obj ) : void
OnHeaderGUI ( ) : void

Private Methods

Method Description
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

Method Details

CreateCachedEditor() public static method

public static CreateCachedEditor ( Object targetObject, Type editorType, Editor &previousEditor ) : void
targetObject Object
editorType System.Type
previousEditor Editor
return void

CreateEditor() public static method

Make a custom editor for targetObject or targetObjects.

public static CreateEditor ( Object targetObject, [ editorType ) : Editor
targetObject Object
editorType [
return Editor

DrawDefaultInspector() public method

Draw the built-in inspector.

public DrawDefaultInspector ( ) : bool
return bool

DrawHeader() public method

Call this function to draw the header of the editor.

public DrawHeader ( ) : void
return void

DrawPreview() public method

The first entry point for Preview Drawing.

public DrawPreview ( Rect previewArea ) : void
previewArea UnityEngine.Rect
return void

DrawPropertiesExcluding() protected static method

protected static DrawPropertiesExcluding ( SerializedObject obj ) : void
obj SerializedObject
return void

GetInfoString() public method

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

public GetInfoString ( ) : string
return string

GetPreviewTitle() public method

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

public GetPreviewTitle ( ) : GUIContent
return UnityEngine.GUIContent

HasPreviewGUI() public method

Override this method in subclasses if you implement OnPreviewGUI.

public HasPreviewGUI ( ) : bool
return bool

Initialize() public method

public Initialize ( Object targets ) : void
targets Object
return void

MoveNextTarget() public method

public MoveNextTarget ( ) : bool
return bool

OnHeaderGUI() protected method

protected OnHeaderGUI ( ) : void
return void

OnInspectorGUI() public method

Implement this function to make a custom inspector.

public OnInspectorGUI ( ) : void
return void

OnInteractivePreviewGUI() public method

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.
return void

OnPreviewGUI() public method

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.
return void

OnPreviewSettings() public method

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

public OnPreviewSettings ( ) : void
return void

ReloadPreviewInstances() public method

public ReloadPreviewInstances ( ) : void
return void

RenderStaticPreview() public method

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
return UnityEngine.Texture2D

Repaint() public method

Repaint any inspectors that shows this editor.

public Repaint ( ) : void
return void

RequiresConstantRepaint() public method

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

public RequiresConstantRepaint ( ) : bool
return bool

ResetTarget() public method

public ResetTarget ( ) : void
return void

UseDefaultMargins() public method

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

public UseDefaultMargins ( ) : bool
return bool