Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Using a folder icon when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleyGoldman committed Jan 23, 2019
1 parent 0940957 commit ae8e308
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ public void SetSelectedPath(NPath path)

if (selectedAssetPath != NPath.Default)
{
nodeIcon = UnityEditorInternal.InternalEditorUtility.GetIconForFile(selectedAssetPath.ToString());
if (selectedAssetPath.DirectoryExists())
{
nodeIcon = Styles.FolderIcon;
}
else
{
nodeIcon = UnityEditorInternal.InternalEditorUtility.GetIconForFile(selectedAssetPath.ToString());
}
}

if (nodeIcon != null)
Expand Down

0 comments on commit ae8e308

Please sign in to comment.