111
This commit is contained in:
15
Assets/GameFramework/Runtime/Asset.cs
Normal file
15
Assets/GameFramework/Runtime/Asset.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
|
||||
namespace Tuan.GameFramework
|
||||
{
|
||||
public class Asset : MonoBehaviour
|
||||
{
|
||||
async UniTask LoadAsync(string name)
|
||||
{
|
||||
AssetHandle handle = YooAssets.LoadAssetAsync(name);
|
||||
await handle.ToUniTask();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user