1- using System ;
1+ using System ;
22using System . Collections ;
33using System . Collections . Generic ;
44using UnityEditor ;
@@ -25,64 +25,63 @@ private static void OnProjectWindowItemOnGUI(string guid, Rect selectionRect)
2525 if ( ! assetPath . StartsWith ( "Assets/Game" ) )
2626 return ;
2727
28- assetPath = assetPath . ToLower ( ) ;
2928 bool isSmall = IsIconSmall ( selectionRect ) ;
3029 Rect iconRect = GetIconRect ( selectionRect , isSmall ) ;
3130 Rect addIconRect = GetAddIconRect ( iconRect , isSmall ) ;
3231 // Rect textRect = GetTextRect(selectionRect, isSmall);
33- if ( assetPath . StartsWith ( "assets/game/animation" ) )
32+ if ( assetPath . StartsWith ( "assets/game/animation" , StringComparison . CurrentCultureIgnoreCase ) )
3433 {
3534 DrawAddIcon ( addIconRect , "animation" ) ;
3635 }
37- else if ( assetPath . StartsWith ( "assets/game/audio" ) )
36+ else if ( assetPath . StartsWith ( "assets/game/audio" , StringComparison . CurrentCultureIgnoreCase ) )
3837 {
3938 DrawAddIcon ( addIconRect , "audio" ) ;
4039 }
41- else if ( assetPath . StartsWith ( "assets/game/datatable" ) )
40+ else if ( assetPath . StartsWith ( "assets/game/datatable" , StringComparison . CurrentCultureIgnoreCase ) )
4241 {
4342 DrawAddIcon ( addIconRect , "excel" ) ;
4443 }
45- else if ( assetPath . StartsWith ( "assets/game/font" ) )
44+ else if ( assetPath . StartsWith ( "assets/game/font" , StringComparison . CurrentCultureIgnoreCase ) )
4645 {
4746 DrawAddIcon ( addIconRect , "font" ) ;
4847 }
49- else if ( assetPath . StartsWith ( "assets/game/minigame" ) )
48+ else if ( assetPath . StartsWith ( "assets/game/minigame" , StringComparison . CurrentCultureIgnoreCase ) )
5049 {
5150 DrawAddIcon ( addIconRect , "game" ) ;
5251 }
53- else if ( assetPath . StartsWith ( "assets/game/scene" ) )
52+ else if ( assetPath . StartsWith ( "assets/game/scene" , StringComparison . CurrentCultureIgnoreCase ) )
5453 {
5554 DrawAddIcon ( addIconRect , "map" ) ;
5655 }
57- else if ( assetPath . StartsWith ( "assets/game/spine" ) )
56+ else if ( assetPath . StartsWith ( "assets/game/spine" , StringComparison . CurrentCultureIgnoreCase ) )
5857 {
5958 DrawAddIcon ( addIconRect , "spine" ) ;
6059 }
61- else if ( assetPath . StartsWith ( "assets/game/texture" ) )
60+ else if ( assetPath . StartsWith ( "assets/game/texture" , StringComparison . CurrentCultureIgnoreCase ) )
6261 {
6362 DrawAddIcon ( addIconRect , "picture" ) ;
6463 }
65- else if ( assetPath . StartsWith ( "assets/game/ui" ) )
64+ else if ( assetPath . StartsWith ( "assets/game/ui" , StringComparison . CurrentCultureIgnoreCase ) )
6665 {
6766 DrawAddIcon ( addIconRect , "phone" ) ;
6867 }
69- else if ( assetPath . StartsWith ( "assets/game/xlua" ) )
68+ else if ( assetPath . StartsWith ( "assets/game/xlua" , StringComparison . CurrentCultureIgnoreCase ) )
7069 {
7170 DrawAddIcon ( addIconRect , "lua" ) ;
7271 }
73- else if ( assetPath . StartsWith ( "assets/game/update" ) )
72+ else if ( assetPath . StartsWith ( "assets/game/update" , StringComparison . CurrentCultureIgnoreCase ) )
7473 {
7574 DrawAddIcon ( addIconRect , "update_circle" ) ;
7675 }
77- else if ( assetPath . StartsWith ( "assets/game/scripts" ) )
76+ else if ( assetPath . StartsWith ( "assets/game/scripts" , StringComparison . CurrentCultureIgnoreCase ) )
7877 {
7978 DrawAddIcon ( addIconRect , "script_01" ) ;
8079 }
81- else if ( assetPath . StartsWith ( "assets/game/shader" ) )
80+ else if ( assetPath . StartsWith ( "assets/game/shader" , StringComparison . CurrentCultureIgnoreCase ) )
8281 {
8382 GUI . DrawTexture ( addIconRect , EditorGUIUtility . IconContent ( "d_ShaderVariantCollection Icon" ) . image , ScaleMode . ScaleToFit ) ;
8483 }
85- else if ( assetPath . StartsWith ( "assets/game/material" ) )
84+ else if ( assetPath . StartsWith ( "assets/game/material" , StringComparison . CurrentCultureIgnoreCase ) )
8685 {
8786 GUI . DrawTexture ( addIconRect , EditorGUIUtility . IconContent ( "Material Icon" ) . image , ScaleMode . ScaleToFit ) ;
8887 }
0 commit comments