Version: 2022.2
public static string applicationPath ;

描述

返回 Unity 编辑器应用程序的路径。(只读)

另请参阅:applicationContentsPath

// Display file system location where the Unity
// executable is stored.

using UnityEditor; using UnityEngine;

public class ApplicationPathExample { [MenuItem("Examples/Location of Unity application")] static void AppPath() { Debug.Log(EditorApplication.applicationPath); } }