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.

EditorApplication

Namespace: UnityEditor

Description

Main Application class.

Static Variables

applicationContentsPathPath to the Unity editor contents folder. (Read Only)
applicationPathReturns the path to the Unity editor application. (Read Only)
currentSceneThe path of the scene that the user has currently open (Will be an empty string if no scene is currently open). (Read Only)
hierarchyWindowChangedEach time an object is (or a group of objects are) created, renamed, parented, unparented or destroyed this callback is raised.
hierarchyWindowItemOnGUIDelegate for OnGUI events for every visible list item in the HierarchyWindow.
isCompilingIs editor currently compiling scripts? (Read Only)
isPausedIs editor currently paused?
isPlayingIs editor currently in play mode?
isPlayingOrWillChangePlaymodeIs editor either currently in play mode, or about to switch to it? (Read Only)
isUpdatingIs editor currently updating? (Read Only)
modifierKeysChangedDelegate for changed keyboard modifier keys.
playmodeStateChangedDelegate for play mode state changes.
projectWindowChangedCallback raised whenever the state of the Project window changes.
projectWindowItemOnGUIDelegate for OnGUI events for every visible list item in the ProjectWindow.
searchChangedCallback raised whenever the contents of a window's search box are changed.
timeSinceStartupThe time since the editor was started. (Read Only)
updateDelegate for generic updates.

Static Functions

BeepPlays system beep sound.
ExecuteMenuItemInvokes the menu item in the specified path.
ExitExit the Unity editor application.
LockReloadAssembliesPrevents loading of assemblies when it is inconvenient.
NewSceneCreate a new scene.
OpenProjectOpen another project.
OpenSceneOpens the scene at path.
OpenSceneAdditiveOpens the scene at path additively.
RepaintHierarchyWindowCan be used to ensure repaint of the HierarchyWindow.
RepaintProjectWindowCan be used to ensure repaint of the ProjectWindow.
SaveAssetsSaves all serializable assets that have not yet been written to disk (eg. Materials).
SaveCurrentSceneIfUserWantsToAsk the user if he wants to save the open scene.
SaveSceneSave the open scene.
StepPerform a single frame step.
UnlockReloadAssembliesMust be called after LockReloadAssemblies, to reenable loading of assemblies.