fix
This commit is contained in:
parent
991c9ccdcc
commit
9dfb118f88
@ -1,9 +1,11 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.AddressableAssets;
|
using UnityEngine.AddressableAssets;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
namespace NEG.Utils.Achivments
|
namespace NEG.Utils.Achivments
|
||||||
{
|
{
|
||||||
@ -24,8 +26,8 @@ namespace NEG.Utils.Achivments
|
|||||||
public static Builder FromLabeledConfig(string label)
|
public static Builder FromLabeledConfig(string label)
|
||||||
{
|
{
|
||||||
var builder = new Builder();
|
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();
|
var configs = handle.WaitForCompletion();
|
||||||
|
|
||||||
@ -46,7 +48,7 @@ namespace NEG.Utils.Achivments
|
|||||||
|
|
||||||
public Builder WithLabeledDefinitions(string label)
|
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();
|
var achivmentCollections = handle.WaitForCompletion();
|
||||||
|
|
||||||
@ -184,7 +186,7 @@ namespace NEG.Utils.Achivments
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new ApplicationException("Invalid achivment id");
|
throw new ApplicationException($"Invalid achivment id {id}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user