21 lines
593 B
C#
21 lines
593 B
C#
using Cysharp.Threading.Tasks;
|
|
using rokid.armaz.module;
|
|
using Stary.Evo.StoryEditor;
|
|
using UnityEngine;
|
|
|
|
public class ResourceLoader : IResource
|
|
{
|
|
public UniTask<T> Load<T>(ResourcePathData pathData) where T : Object
|
|
{
|
|
return AMP.ResourceLoader.LoadAssetAsync<T>(pathData.packageID, pathData.path);
|
|
}
|
|
|
|
public UniTask<ResourcePathData> Save<T>(T asset, string packageID) where T : Object
|
|
{
|
|
ResourcePathData pathData = new();
|
|
pathData.packageID = packageID;
|
|
pathData.AddPath(asset.name);
|
|
return UniTask.FromResult(pathData);
|
|
}
|
|
}
|