public static GUIContent GetContentForAsset(string path)
{
Texture cachedIcon = AssetDatabase.GetCachedIcon(path);
if (path.StartsWith("Library/"))
{
path = ObjectNames.NicifyVariableName(AssetDatabase.LoadMainAssetAtPath(path).name);
}
if (path.StartsWith("Assets/"))
{
path = path.Substring(7);
}
return new GUIContent(path, cachedIcon);
}