Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

EditorUtility

Namespace: UnityEditor

Description

Editor utility functions.

Static Functions

ClearProgressBarRemoves progress bar.
CollectDeepHierarchyCollect all objects in the hierarchy rooted at each of the given objects. This is most useful for linearizing entire GameObject hierarchies including all their components.
CollectDependenciesCalculates and returns a list of all assets the assets listed in roots depend on.
CompressTextureCompress a texture.
CopySerializedCopy all settings of a Unity Object.
CreateGameObjectWithHideFlagsCreates a game object with HideFlags and specified components.
DisplayCancelableProgressBarDisplays or updates a progress bar that has a cancel button.
DisplayDialogDisplays a modal dialog.
DisplayDialogComplexDisplays a modal dialog with three buttons.
DisplayPopupMenuDisplays a popup menu.
DisplayProgressBarDisplays or updates a progress bar.
ExtractOggFileSaves an AudioClip or MovieTexture to a file.
FocusProjectWindowBrings the project window to the front and focuses it.
FormatBytesReturns a text for a number of bytes.
GetObjectEnabledIs the object enabled (0 disabled, 1 enabled, -1 has no enabled button).
InstanceIDToObjectTranslates an instance ID to a reference to an object.
IsPersistentDetermines if an object is stored on disk.
NaturalCompareHuman-like sorting.
OpenFilePanelDisplays the "open file" dialog and returns the selected path name.
OpenFolderPanelDisplays the "open folder" dialog and returns the selected path name.
SaveFilePanelDisplays the "save file" dialog and returns the selected path name.
SaveFilePanelInProjectDisplays the "save file" dialog in the Assets folder of the project and returns the selected path name.
SaveFolderPanelDisplays the "save folder" dialog and returns the selected path name.
SetDirtyMarks target object as dirty.
SetObjectEnabledSet the enabled state of the object.
SetSelectedWireframeHiddenSet whether the renderer's wireframe will be hidden when the renderer's gameobject is selected.
UnloadUnusedAssetsUnloads assets that are not used.
UnloadUnusedAssetsIgnoreManagedReferencesUnloads assets that are not used, including the ones that are referenced only from scripts.