EditorApplication
.applicationPath
Manual
Reference
Scripting
Scripting
>
Editor Classes
>
EditorApplication
EditorApplication
.applicationPath
Menu
Overview
Runtime Classes
Attributes
Enumerations
Editor Classes
Enumerations
History
Index
EditorApplication
All Members
Class Variables
applicationContentsPath
applicationPath
currentScene
isCompiling
isPaused
isPlaying
isPlayingOrWillChangePlaymode
modifierKeysChanged
playmodeStateChanged
timeSinceStartup
update
Class Functions
Beep
ExecuteMenuItem
Exit
LockReloadAssemblies
NewScene
OpenProject
OpenScene
OpenSceneAdditive
SaveAssets
SaveCurrentSceneIfUserWantsTo
SaveScene
Step
UnlockReloadAssemblies
Delegates
CallbackFunction
static
var
applicationPath :
string
Description
Returns the path to the Unity editor application
(Read Only)
See Also:
applicationContentsPath
.
// This example lets you load
Editor
scripts
// automatically to your current working project
//
// Just place your editor scripts next to where the Unity binary
// resides.
@
MenuItem
(
"Example/Load
Editor
Scripts"
)
static
function
LoadEditorScripts() {
// Get the editor folder that resides next to the Unity exec
var
appPath :
String
[] =
EditorApplication.applicationPath
.Split(char.Parse(
"/"
));
appPath[appPath.Length -1] =
"
Editor
"
;
var
editorFolder :
String
=
String
.Join(
"/"
,appPath);
Debug.Log
(
"Loading editor scripts at: "
+ editorFolder);
FileUtil.CopyFileOrDirectory
(editorFolder,
"Assets/"
);
}