@@ -12,7 +12,6 @@ namespace GBG.AssetQuickAccess.Editor
1212 public partial class AssetQuickAccessWindow
1313 {
1414 private const float AssetIconSize = 24f ;
15- private const float CategoryIconSize = 16f ;
1615 private const double DoubleClickInterval = 0.4f ;
1716
1817 private ReorderableList _assetList ;
@@ -69,42 +68,31 @@ private void DrawAssetListItem(Rect rect, int index, bool isActive, bool isFocus
6968 AssetHandle assetHandle = _filteredAssetHandles [ index ] ;
7069 // string categoryIconTooltip;
7170 Texture assetIconTex ;
72- Texture categoryIconTex ;
7371 switch ( assetHandle . Category )
7472 {
7573 case AssetCategory . ProjectAsset :
7674 assetIconTex = TextureUtility . GetObjectIcon ( assetHandle ) ;
77- categoryIconTex = null ;
78- // categoryIconTooltip = null;
7975 break ;
8076
8177 case AssetCategory . SceneObject :
8278 assetIconTex = TextureUtility . GetObjectIcon ( assetHandle ) ;
83- categoryIconTex = TextureUtility . GetSceneObjectTexture ( true ) ;
84- // categoryIconTooltip = "Scene Object";
8579 break ;
8680
8781 case AssetCategory . ExternalFile :
8882 string path = assetHandle . GetAssetPath ( ) ;
8983 assetIconTex = File . Exists ( path ) || Directory . Exists ( path )
9084 ? TextureUtility . GetExternalFileTexture ( false )
9185 : TextureUtility . GetWarningTexture ( ) ;
92- categoryIconTex = TextureUtility . GetExternalFileTexture ( true ) ;
93- // categoryIconTooltip = "External File of Folder";
9486 break ;
9587
9688 case AssetCategory . Url :
9789 // string url = assetHandle.GetAssetPath();
9890 assetIconTex = TextureUtility . GetUrlTexture ( ) ;
99- categoryIconTex = assetIconTex ;
100- // categoryIconTooltip = "URL";
10191 break ;
10292
10393 case AssetCategory . MenuItem :
10494 // string url = assetHandle.GetAssetPath();
10595 assetIconTex = TextureUtility . GetMenuItemTexture ( ) ;
106- categoryIconTex = assetIconTex ;
107- // categoryIconTooltip = "MenuItem";
10896 break ;
10997
11098 default :
@@ -141,9 +129,7 @@ private void DrawAssetListItem(Rect rect, int index, bool isActive, bool isFocus
141129 {
142130 x = rect . x + AssetIconSize ,
143131 y = rect . y ,
144- width = categoryIconTex
145- ? rect . width - AssetIconSize - CategoryIconSize - 2 // Margin right: 2
146- : rect . width - AssetIconSize ,
132+ width = rect . width - AssetIconSize ,
147133 height = rect . height
148134 } ;
149135 if ( _assetItemStyle == null )
@@ -167,23 +153,6 @@ private void DrawAssetListItem(Rect rect, int index, bool isActive, bool isFocus
167153 }
168154
169155 #endregion
170-
171-
172- #region Category icon
173-
174- if ( categoryIconTex )
175- {
176- Rect categoryIconRect = new Rect
177- {
178- x = rect . xMax - CategoryIconSize ,
179- y = rect . y + ( rect . height - CategoryIconSize ) / 2f ,
180- width = CategoryIconSize ,
181- height = CategoryIconSize
182- } ;
183- GUI . DrawTexture ( categoryIconRect , categoryIconTex ) ;
184- }
185-
186- #endregion
187156 }
188157 }
189158
0 commit comments