Example #1
0
        public override string Convert(string assetPath)
        {
            if (m_converter == null)
            {
                m_converter = new WildcardConverter(m_packName);
            }

            return(m_converter.Convert(assetPath));
        }
Example #2
0
        public virtual IList <IBundleGroup> GetGrouping(IBundleBuildConfig config, IBundleNameConverter converter, IReadOnlyList <string> packagedAssets)
        {
            var table  = new Dictionary <string, List <string> >();
            var prefix = config.TargetDirPath.ToConvertDelimiter().ToLower();

            foreach (var assetPath in packagedAssets)
            {
                var key = converter.Convert(assetPath).ToLower().Replace(prefix, string.Empty);
                if (!table.TryGetValue(key, out var list))
                {
                    list       = new List <string>();
                    table[key] = list;
                }
                list.Add(assetPath);
            }

            return(table.Select(item => Build(item.Key, item.Value)).ToArray());
        }