File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77## [ 1.5.0] - 2018-02-28
88- Code static analysis cleanup.
99- Documentation updates.
10+ - fix to missing bundle-icon bug.
1011
1112## [ 1.4.0] - 2018-02-23
1213- Added a search bar to the main tab. Searches based on asset name.
Original file line number Diff line number Diff line change @@ -783,14 +783,12 @@ static internal Texture2D GetSceneIcon()
783783 static private void FindBundleIcons ( )
784784 {
785785 s_folderIcon = EditorGUIUtility . FindTexture ( "Folder Icon" ) ;
786- string [ ] icons = AssetDatabase . FindAssets ( "ABundleBrowserIconY1756" ) ;
787- foreach ( string i in icons )
788- {
789- string name = AssetDatabase . GUIDToAssetPath ( i ) ;
790- if ( name . Contains ( "ABundleBrowserIconY1756Basic.png" ) )
791- s_bundleIcon = ( Texture2D ) AssetDatabase . LoadAssetAtPath ( name , typeof ( Texture2D ) ) ;
792- else if ( name . Contains ( "ABundleBrowserIconY1756Scene.png" ) )
793- s_sceneIcon = ( Texture2D ) AssetDatabase . LoadAssetAtPath ( name , typeof ( Texture2D ) ) ;
786+
787+ var packagePath = System . IO . Path . GetFullPath ( "Packages/com.unity.assetbundlebrowser" ) ;
788+ if ( System . IO . Directory . Exists ( packagePath ) )
789+ {
790+ s_bundleIcon = ( Texture2D ) AssetDatabase . LoadAssetAtPath ( "Packages/com.unity.assetbundlebrowser/Editor/Icons/ABundleBrowserIconY1756Basic.png" , typeof ( Texture2D ) ) ;
791+ s_sceneIcon = ( Texture2D ) AssetDatabase . LoadAssetAtPath ( "Packages/com.unity.assetbundlebrowser/Editor/Icons/ABundleBrowserIconY1756Scene.png" , typeof ( Texture2D ) ) ;
794792 }
795793 }
796794 }
You can’t perform that action at this time.
0 commit comments