Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

EditorUtility

Namespace: UnityEditor

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

Sumbission failed

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

Close

Cancel

Description

Editor utility functions.

Static Functions

ClearProgressBar Removes progress bar.
CollectDeepHierarchy Collect 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.
CollectDependencies Calculates and returns a list of all assets the assets listed in roots depend on.
CompressTexture Compress a texture.
CopySerialized Copy all settings of a Unity Object.
CreateGameObjectWithHideFlags Creates a game object with HideFlags and specified components.
DisplayCancelableProgressBar Displays or updates a progress bar that has a cancel button.
DisplayDialog Displays a modal dialog.
DisplayDialogComplex Displays a modal dialog with three buttons.
DisplayPopupMenu Displays a popup menu.
DisplayProgressBar Displays or updates a progress bar.
ExtractOggFile Saves an AudioClip or MovieTexture to a file.
FocusProjectWindow Brings the project window to the front and focuses it.
FormatBytes Returns a text for a number of bytes.
GetObjectEnabled Is the object enabled (0 disabled, 1 enabled, -1 has no enabled button).
InstanceIDToObject Translates an instance ID to a reference to an object.
IsPersistent Determines if an object is stored on disk.
NaturalCompare Human-like sorting.
OpenFilePanel Displays the "open file" dialog and returns the selected path name.
OpenFolderPanel Displays the "open folder" dialog and returns the selected path name.
SaveFilePanel Displays the "save file" dialog and returns the selected path name.
SaveFilePanelInProject Displays the "save file" dialog in the Assets folder of the project and returns the selected path name.
SaveFolderPanel Displays the "save folder" dialog and returns the selected path name.
SetDirty Marks target object as dirty.
SetObjectEnabled Set the enabled state of the object.
SetSelectedWireframeHidden Set whether the renderer's wireframe will be hidden when the renderer's gameobject is selected.
UnloadUnusedAssets Unloads assets that are not used.
UnloadUnusedAssetsIgnoreManagedReferences Unloads assets that are not used, including the ones that are referenced only from scripts.