public static AssetRes Allocate(string name) { AssetRes res = ObjectPool <AssetRes> .S.Allocate(); if (res != null) { res.AssetName = name; res.InitAssetBundleName(); } return(res); }
public IRes CreateRes(string name) { AssetData data = AssetDataTable.S.GetAssetData(name); switch (data.AssetType) { case ResLoadType.AssetBundle: return(AssetBundleRes.Allocate(name)); case ResLoadType.ABAsset: return(AssetRes.Allocate(name)); case ResLoadType.ABScene: return(SceneRes.Allocate(name)); default: return(null); } }