コード例 #1
0
ファイル: RecycleBinItem.cs プロジェクト: yxpandjay/HalfSLG
        public AssetBundleInfoNode Cancel()
        {
            AssetBundleInfoNode node = assetBundleInfoNode;

            pool.Return(this);
            return(node);
        }
コード例 #2
0
        private void ExplortAssetBundleConfig(List <AssetRefrenceNode> list, string exportPath)
        {
            Dictionary <string, AssetBundleInfoNode> map = new Dictionary <string, AssetBundleInfoNode>();

            foreach (var assetRefrenceNode in list)
            {
                var bundleNode = new AssetBundleInfoNode();
                var name       = Utility.GetFileNameWithOutExtension(assetRefrenceNode.AssetPath);
                bundleNode.assetName = name;
                foreach (var depPath in assetRefrenceNode.depence)
                {
                    var depName = Utility.GetFileNameWithOutExtension(depPath);
                    bundleNode.depenceList.Add(depName);
                }
                map.Add(name, bundleNode);
            }

            var json       = JsonMapper.ToJson(map);
            var configPath = exportPath + "/" + Monster.BaseSystem.ResourceManager.BundleConfig.CONFIG_FILE_NAME;

            if (File.Exists(configPath))
            {
                File.Delete(configPath);
            }
            using (var writer = File.CreateText(configPath))
            {
                writer.Write(json);
            }
        }
コード例 #3
0
ファイル: RecycleBinItem.cs プロジェクト: yxpandjay/HalfSLG
 public void OnRecycle()
 {
     assetBundleInfoNode = null;
     timeStamp           = 0;
 }