Пример #1
0
        public static AssetRes Allocate(string name)
        {
            AssetRes res = ObjectPool <AssetRes> .S.Allocate();

            if (res != null)
            {
                res.AssetName = name;
                res.InitAssetBundleName();
            }
            return(res);
        }
Пример #2
0
            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);
                }
            }