@@ -282,7 +282,7 @@ public Resource GetResource(string name, string variant)
282282 }
283283
284284 Resource resource = null ;
285- if ( m_Resources . TryGetValue ( GetResourceFullName ( name , variant ) . ToLower ( ) , out resource ) )
285+ if ( m_Resources . TryGetValue ( GetResourceFullName ( name , variant ) . ToLowerInvariant ( ) , out resource ) )
286286 {
287287 return resource ;
288288 }
@@ -297,7 +297,7 @@ public bool HasResource(string name, string variant)
297297 return false ;
298298 }
299299
300- return m_Resources . ContainsKey ( GetResourceFullName ( name , variant ) . ToLower ( ) ) ;
300+ return m_Resources . ContainsKey ( GetResourceFullName ( name , variant ) . ToLowerInvariant ( ) ) ;
301301 }
302302
303303 public bool AddResource ( string name , string variant , string fileSystem , LoadType loadType , bool packed )
@@ -323,7 +323,7 @@ public bool AddResource(string name, string variant, string fileSystem, LoadType
323323 }
324324
325325 Resource resource = Resource . Create ( name , variant , fileSystem , loadType , packed , resourceGroups ) ;
326- m_Resources . Add ( resource . FullName . ToLower ( ) , resource ) ;
326+ m_Resources . Add ( resource . FullName . ToLowerInvariant ( ) , resource ) ;
327327
328328 return true ;
329329 }
@@ -351,9 +351,9 @@ public bool RenameResource(string oldName, string oldVariant, string newName, st
351351 return false ;
352352 }
353353
354- m_Resources . Remove ( resource . FullName . ToLower ( ) ) ;
354+ m_Resources . Remove ( resource . FullName . ToLowerInvariant ( ) ) ;
355355 resource . Rename ( newName , newVariant ) ;
356- m_Resources . Add ( resource . FullName . ToLower ( ) , resource ) ;
356+ m_Resources . Add ( resource . FullName . ToLowerInvariant ( ) , resource ) ;
357357
358358 return true ;
359359 }
@@ -373,7 +373,7 @@ public bool RemoveResource(string name, string variant)
373373
374374 Asset [ ] assets = resource . GetAssets ( ) ;
375375 resource . Clear ( ) ;
376- m_Resources . Remove ( resource . FullName . ToLower ( ) ) ;
376+ m_Resources . Remove ( resource . FullName . ToLowerInvariant ( ) ) ;
377377 foreach ( Asset asset in assets )
378378 {
379379 m_Assets . Remove ( asset . Guid ) ;
@@ -500,7 +500,7 @@ public bool AssignAsset(string guid, string name, string variant)
500500 continue ;
501501 }
502502
503- if ( assetInResource . Name . ToLower ( ) == assetName . ToLower ( ) )
503+ if ( assetInResource . Name . ToLowerInvariant ( ) == assetName . ToLowerInvariant ( ) )
504504 {
505505 return false ;
506506 }
@@ -617,7 +617,7 @@ private bool IsAvailableResourceName(string name, string variant, Resource curre
617617 string [ ] pathNames = resource . Name . Split ( '/' ) ;
618618 for ( int i = 0 ; i < foundPathNames . Length - 1 && i < pathNames . Length - 1 ; i ++ )
619619 {
620- if ( foundPathNames [ i ] . ToLower ( ) != pathNames [ i ] . ToLower ( ) )
620+ if ( foundPathNames [ i ] . ToLowerInvariant ( ) != pathNames [ i ] . ToLowerInvariant ( ) )
621621 {
622622 break ;
623623 }
0 commit comments