Exemple #1
0
        private void RetrievalResourceBuildInfo(ResourceItemConfig _Item, ref AppBuileInfo _BuildInfo)
        {
            string AssetBundleName = _Item.AssetBundleName.ToLower() + AppConfig.ResFileSuffix;

            if (!_BuildInfo.AppResInfo.ContainsKey(AssetBundleName))
            {
                _BuildInfo.AppResInfo[AssetBundleName] = new ResBuileInfo
                {
                    Id     = AssetBundleName,
                    Model  = _Item.ModelName,
                    Assets = new List <string>()
                };
            }
            if (_Item.NodelType == ResourceBuildNodelType.ResourcesItemNodel)
            {
                _BuildInfo.AppResInfo[AssetBundleName].Assets.Add(_Item.Path.Substring(AppConfig.PlatformRoot.Length + 1));
            }
            else
            {
                foreach (var item in _Item.ChildBuildItem)
                {
                    RetrievalResourceBuildInfo(item, ref _BuildInfo);
                }
            }
        }
Exemple #2
0
 public void RefreshViewGUI(ResourceItemConfig Parent)
 {
     if (Parent.IsShowBuildToogle && !Parent.IsMergeBuild)
     {
         IsShowBuildToogle = true;
         IsMergeBuild      = true;
         AssetBundleName   = Parent.AssetBundleName + "/" + Name;
     }
     else
     {
         IsShowBuildToogle = false;
         AssetBundleName   = Parent.AssetBundleName;
     }
     RefreshChildViewGUI();
 }
Exemple #3
0
 /// <param name="_Other"></param>
 public void MergeConfig(ResourceItemConfig _Other)
 {
     foreach (var item1 in _Other.ChildBuildItem)
     {
         bool IsKeep = false;
         foreach (var item2 in ChildBuildItem)
         {
             if (item1.Name == item2.Name)
             {
                 item2.MergeConfig(item1);
                 IsKeep = true;
                 break;
             }
         }
         if (!IsKeep)
         {
             ChildBuildItem.Add(item1);
         }
     }
 }
Exemple #4
0
 public ResourceItemConfig(string _RootName, ResourceItemConfig _Parent, string _Path)
 {
     RootName       = _RootName;
     Path           = _Path;
     Name           = PathTools.GetPathFolderName(Path);
     ModelName      = _Parent == null ? ModelName : _Parent.ModelName;
     Layer          = _Parent == null ? 0 : _Parent.Layer + 1;
     ChildBuildItem = new List <ResourceItemConfig>();
     if (PathTools.IsDirectory(Path))
     {
         string[] fileList = Directory.GetFileSystemEntries(Path);
         foreach (string file in fileList)
         {
             ResourceItemConfig Item = new ResourceItemConfig(RootName, this, file);
             if (Item.NodelType != ResourceBuildNodelType.UselessNodel)
             {
                 ChildBuildItem.Add(Item);
             }
         }
         if (ChildBuildItem.Count > 0)
         {
             NodelType = ResourceBuildNodelType.FolderNodel;
         }
         else
         {
             NodelType = ResourceBuildNodelType.UselessNodel;
         }
     }
     else
     {
         if (PathTools.CheckSuffix(Path, ToolsConfig.CanBuildFileTypes))
         {
             Name      = Name.Substring(0, Name.IndexOf("."));
             NodelType = ResourceBuildNodelType.ResourcesItemNodel;
         }
         else
         {
             NodelType = ResourceBuildNodelType.UselessNodel;
         }
     }
 }