Пример #1
0
        public void WriteToInfo(ref CustomAssetComponentInfo target, out List <CustomAsset> assets)
        {
            target.valid      = m_Valid;
            target.bundleName = m_BundleName;

            assets = m_Assets;
        }
Пример #2
0
        private void WriteToInfo()
        {
            var list = m_Assets;
            int max  = list.Count;

            for (int i = 0; i < max; i++)
            {
                var comp = m_Assets[i];
                CustomAssetComponentInfo compInfo;
                if (i < m_Info.assets.Count)
                {
                    compInfo = m_Info.assets[i];
                }
                else
                {
                    compInfo = new CustomAssetComponentInfo();
                    m_Info.assets.Add(compInfo);
                }
                comp.WriteToInfo(ref compInfo, out var customAssets);

                compInfo.assetItems?.Clear();
                compInfo.assetItems = new List <CustomAssetInfo>();

                int m = customAssets.Count;
                for (int j = 0; j < m; j++)
                {
                    var asset = customAssets[j];
                    var info  = new CustomAssetInfo();
                    asset.WriteToInfo(ref info);
                    compInfo.assetItems.Add(info);
                }
            }
        }
Пример #3
0
        public void SyncFromInfo(ref CustomAssetComponentInfo info, out List <CustomAsset> assets)
        {
            m_BundleName = info.bundleName;
            m_Valid      = info.valid;

            assets = m_Assets;
        }