言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

EditorApplication.applicationPath

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

public static var applicationPath: string;
public static string applicationPath;
public static applicationPath as string

Description

UnityEditorアプリケーションのパス (Read Only)

	// 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/");
	}