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

Commit 9cd216c

Browse files
Merge pull request #716 from ThomasAunvik/origin/fixes/ui/node-icon-file
Icons not showing DefaultAsset Icon
2 parents 9ed7798 + aa01a12 commit 9cd216c

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Styles.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ class Styles
9090
favoriteIconOff,
9191
smallLogoIcon,
9292
bigLogoIcon,
93-
defaultAssetIcon,
9493
folderIcon,
9594
mergeIcon,
9695
dotIcon,
@@ -784,19 +783,6 @@ public static Texture2D LocalCommitIcon
784783
}
785784
}
786785

787-
public static Texture2D DefaultAssetIcon
788-
{
789-
get
790-
{
791-
if (defaultAssetIcon == null)
792-
{
793-
defaultAssetIcon = EditorGUIUtility.FindTexture("DefaultAsset Icon");
794-
}
795-
796-
return defaultAssetIcon;
797-
}
798-
}
799-
800786
public static Texture2D FolderIcon
801787
{
802788
get

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesTreeControl.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,13 @@ protected Texture GetNodeIcon(ChangesTreeNode node)
163163
{
164164
if (!string.IsNullOrEmpty(node.ProjectPath))
165165
{
166-
nodeIcon = AssetDatabase.GetCachedIcon(node.ProjectPath);
166+
nodeIcon = UnityEditorInternal.InternalEditorUtility.GetIconForFile(node.ProjectPath);
167167
}
168168

169169
if (nodeIcon != null)
170170
{
171171
nodeIcon.hideFlags = HideFlags.HideAndDontSave;
172172
}
173-
else
174-
{
175-
nodeIcon = Styles.DefaultAssetIcon;
176-
}
177173
}
178174

179175
return nodeIcon;

0 commit comments

Comments
 (0)