Version: 2021.1
LanguageEnglish
  • C#

ScriptedImporterEditor

class in UnityEditor.AssetImporters

/

Inherits from:AssetImporters.AssetImporterEditor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Default editor for source assets handled by Scripted Importers.

Inherited Members

Properties

extraDataSerializedObjectA SerializedObject that represents the extraDataTarget or the extraDataTargets of the AssetImporterEditor.
extraDataTargetThe extra data object associated with the Editor.target.
extraDataTargetsAn array of objects associated with each Editor.targets.
extraDataTypeOverride this property to return a type that inherits from ScriptableObject. This makes the AssetImporterEditor aware of serialized data outside of the Importer.
needsApplyRevertWhether the ApplyRevertGUI method is required to draw in the Inspector.
showImportedObjectShould imported object be shown as a separate editor?
useAssetDrawPreviewDetermines if the asset preview is handled by the AssetEditor or the Importer DrawPreview
serializedObjectA SerializedObject representing the object or objects being inspected.
targetThe object being inspected.
targetsAn array of all the object being inspected.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public Methods

HasModifiedDetermine if the import settings have been modified.
OnDisableThis function is called when the editor object goes out of scope.
OnEnableThis function is called when the object is loaded.
OnInspectorGUIOverride this method to create your own Inpsector GUI for a ScriptedImporter.
CreateInspectorGUIImplement this method to make a custom UIElements inspector.
DrawDefaultInspectorDraws the built-in inspector.
DrawHeaderCall this function to draw the header of the editor.
DrawPreviewThe first entry point for Preview Drawing.
GetInfoStringImplement this method to show asset information on top of the asset preview.
GetPreviewTitleOverride this method if you want to change the label of the Preview area.
HasPreviewGUIOverride this method in subclasses if you implement OnPreviewGUI.
OnInspectorGUIImplement this function to make a custom inspector.
OnInteractivePreviewGUIImplement to create your own interactive custom preview. Interactive custom previews are used in the preview area of the inspector and the object selector.
OnPreviewGUIImplement to create your own custom preview for the preview area of the inspector, the headers of the primary editor, and the object selector.
OnPreviewSettingsOverride this method if you want to show custom controls in the preview header.
RenderStaticPreviewOverride this method if you want to render a static preview.
RepaintRedraw any inspectors that shows this editor.
RequiresConstantRepaintChecks if this editor requires constant repaints in its current state.
UseDefaultMarginsOverride this method in subclasses to return false if you don't want default margins.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Protected Methods

ApplySaves any changes from the Editor's control into the asset's import settings object.
ApplyAndImportSaves the changes from the editor UI to the settings object and imports the asset.
ApplyButtonImplements the 'Apply' button of the inspector.
ApplyRevertGUIAdd's the 'Apply' and 'Revert' buttons to the editor.
AwakeThis function is called when the Editor script is started.
CanApplyDetermines if the modifications to import settings can be applied.
InitializeExtraDataInstanceThis method is called during the initialization process of the Editor, after Awake and before OnEnable.
OnApplyRevertGUIProcess the 'Apply' and 'Revert' buttons.
ResetValuesReset the import settings to their last saved values.
RevertButtonImplements the 'Revert' button of the inspector.
ShouldHideOpenButtonReturns the visibility setting of the "open" button in the Inspector.

Static Methods

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.
CreateEditorMake a custom editor for targetObject or targetObjects.
CreateEditorWithContextMake a custom editor for targetObject or targetObjects with a context object.
DrawFoldoutInspectorDraws the inspector GUI with a foldout header for target.
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.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeGets a list of all 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

HasFrameBoundsValidates whether custom bounds can be calculated for this editor.
OnGetFrameBoundsGets custom bounds for the target of this editor.
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.
OnDisableThis function is called when the scriptable object goes out of scope.
OnEnableThis function is called when the object is loaded.
OnValidateEditor-only function that Unity calls when the script is loaded or a value changes in the Inspector.
ResetReset to default values.

Events

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