[MenuItem("Tools/GetSelectPaths")]
public static void Execute()
{
string[] strs = Selection.assetGUIDs;
var curPath = System.IO.Directory.GetCurrentDirectory();
foreach (var item in strs)
{
string path = AssetDatabase.GUIDToAssetPath(item);
Debug.Log(curPath+"/"+path);
}
}
获取工程中文件的绝对路径
发布时间 2023-04-01 14:43:02作者: 钢与铁