achivments #1

Closed
Ghost wants to merge 13 commits from achivments into main
Showing only changes of commit 9dfb118f88 - Show all commits

View File

@ -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
{
@ -25,7 +27,7 @@ namespace NEG.Utils.Achivments
{
var builder = new Builder();
var handle = Addressables.LoadAssetsAsync<AchivmentManagerConfig>(DefaultAchivmentsConfigLabel, delegate { }, Addressables.MergeMode.Union, false);
var handle = Addressables.LoadAssetsAsync<IAchivmentManagerConfig>((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<AchivmentDefinitionCollection>(label, delegate { }, Addressables.MergeMode.Union, false);
var handle = Addressables.LoadAssetsAsync<AchivmentDefinitionCollection>((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}");
}
}
}