Skip to content

Commit

Permalink
fix(core): fix compile error inside AddressableAssetResolver in Unity…
Browse files Browse the repository at this point in the history
… 2020
  • Loading branch information
jonisavo committed Sep 26, 2023
1 parent 709c652 commit 7956148
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Assets/UIComponents/Addressables/AddressableAssetResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ public async Task<bool> AssetExists(string assetPath)

var exists = locations.Count > 0;

#if UNITY_2021_3_OR_NEWER
AssetPathExistsCache.TryAdd(assetPath, exists);
#else
if (!AssetPathExistsCache.ContainsKey(assetPath))
AssetPathExistsCache.Add(assetPath, exists);
#endif

return exists;
}
Expand Down

0 comments on commit 7956148

Please sign in to comment.