示例#1
0
        public ABUnit GetABUnit(string assetName)
        {
            var resSearchRule = ResSearchRule.Allocate(assetName);

            AssetData data = GetAssetData(resSearchRule);

            resSearchRule.Recycle2Cache();

            if (data == null)
            {
                return(null);
            }

            if (mABUnitArray == null)
            {
                return(null);
            }

            return(mABUnitArray[data.AssetBundleIndex]);
        }
示例#2
0
        public SerializeData GetSerializeData()
        {
            var sd = new SerializeData();

            sd.key         = m_Key;
            sd.abUnitArray = mABUnitArray.ToArray();
            if (mAssetDataMap != null)
            {
                AssetData[] acArray = new AssetData[mAssetDataMap.Count];

                int index = 0;
                foreach (var item in mAssetDataMap)
                {
                    acArray[index++] = item.Value;
                }

                sd.assetDataArray = acArray;
            }

            return(sd);
        }