27 lines
666 B
C#
27 lines
666 B
C#
using System.Buffers;
|
|
using AlicizaX.ObjectPool;
|
|
using AlicizaX;
|
|
|
|
namespace AlicizaX.Resource.Runtime
|
|
{
|
|
public class AssetItemObject : ObjectBase
|
|
{
|
|
public static AssetItemObject Create(string location, UnityEngine.Object target)
|
|
{
|
|
AssetItemObject item = MemoryPool.Acquire<AssetItemObject>();
|
|
item.Initialize(location, target);
|
|
return item;
|
|
}
|
|
|
|
protected internal override void Release(bool isShutdown)
|
|
{
|
|
if (Target == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
ModuleSystem.GetModule<IResourceModule>().UnloadAsset(Target);
|
|
}
|
|
}
|
|
}
|