using UnityEngine; using System.Collections; using System.IO; public class EditorUtils : MonoBehaviour { /// /// /// /// /// filename public static string SelectObjectPathInfo(ref string dirName) { if (UnityEditor.Selection.activeInstanceID < 0) { return ""; } string path = UnityEditor.AssetDatabase.GetAssetPath(UnityEditor.Selection.activeInstanceID); dirName = Path.GetDirectoryName(path) + "/"; return Path.GetFileName(path); } }