File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 <Reference Include =" UnityEngine.UIModule" >
1818 <HintPath >..\MiniMapMod\libs\UnityEngine.UIModule.dll</HintPath >
1919 </Reference >
20+ <Reference Include =" LegacyResourcesAPI" >
21+ <HintPath >..\MiniMapMod\libs\LegacyResourcesAPI.dll</HintPath >
22+ </Reference >
2023 </ItemGroup >
2124
2225</Project >
Original file line number Diff line number Diff line change 44using System . Text ;
55using System . Threading . Tasks ;
66using UnityEngine ;
7+ using RoR2 ;
78
89#nullable enable
910namespace MiniMapLibrary
@@ -48,15 +49,15 @@ public void Dispose()
4849 return SpriteCache [ Path ] ;
4950 }
5051
51- Sprite ? loaded = Resources . Load < Sprite > ( Path ) ;
52+ Sprite ? loaded = RoR2 . LegacyResourcesAPI . Load < Sprite > ( Path ) ;
5253
5354 if ( loaded != null )
5455 {
5556 SpriteCache . Add ( Path , loaded ) ;
5657 }
5758 else
5859 {
59- loaded = Resources . Load < Sprite > ( Settings . Icons . Default ) ;
60+ loaded = RoR2 . LegacyResourcesAPI . Load < Sprite > ( Settings . Icons . Default ) ;
6061
6162 if ( loaded is null )
6263 {
You can’t perform that action at this time.
0 commit comments