AK056/Assets/GameLogic/Origin/source/AddressableLoader.cs

24 lines
479 B
C#

using EasyInject.Attributes;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
/// <summary>
/// AB °ü¼ÓÔØÆ÷
/// </summary>
[Component]
public class AddressableLoader : ISourceLoader
{
public void LoadByLabel(string label)
{
Addressables.LoadAssetAsync<GameObject>(label);
}
public void LoadPrefab(string address)
{
Addressables.LoadAssetAsync<GameObject>(address);
}
}