一小段代码。
[MenuItem("Assets/复制(文件)路径")]
static void CopyFilePath()
{
string RelativePath = AssetDatabase.GetAssetPath(Selection.activeObject);
string physicalPath = System.Environment.CurrentDirectory.Replace("\\", "/") + "/" + RelativePath;
Debug.Log(physicalPath);
GUIUtility.systemCopyBuffer = physicalPath;
}
直接c + v