【m】[1.0.5] - 2026-01-06
### Changed - 添加更新日志 - 修改加载器选择范围,允许指定程序集检查 ### Fixed - 处理Sample在UnityPackage窗口不显示的问题
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user