diff --git a/Achivments/AchivmentManager.cs b/Achivments/AchivmentManager.cs index ead9a9a..0367b35 100644 --- a/Achivments/AchivmentManager.cs +++ b/Achivments/AchivmentManager.cs @@ -1,9 +1,11 @@ using System.Collections; using System.Collections.Generic; using System; +using System.Linq; using UnityEngine; using UnityEngine.AddressableAssets; using System.Runtime.CompilerServices; +using UnityEditor; namespace NEG.Utils.Achivments { @@ -24,8 +26,8 @@ namespace NEG.Utils.Achivments public static Builder FromLabeledConfig(string label) { var builder = new Builder(); - - var handle = Addressables.LoadAssetsAsync(DefaultAchivmentsConfigLabel, delegate { }, Addressables.MergeMode.Union, false); + + var handle = Addressables.LoadAssetsAsync((IEnumerable)new string[] { label }, delegate { }, Addressables.MergeMode.Union, false); var configs = handle.WaitForCompletion(); @@ -46,7 +48,7 @@ namespace NEG.Utils.Achivments public Builder WithLabeledDefinitions(string label) { - var handle = Addressables.LoadAssetsAsync(label, delegate { }, Addressables.MergeMode.Union, false); + var handle = Addressables.LoadAssetsAsync((IEnumerable)new string[] { label }, delegate { }, Addressables.MergeMode.Union, false); var achivmentCollections = handle.WaitForCompletion(); @@ -184,7 +186,7 @@ namespace NEG.Utils.Achivments } else { - throw new ApplicationException("Invalid achivment id"); + throw new ApplicationException($"Invalid achivment id {id}"); } } }