Exemple #1
0
        public override void OnAssetImport(string assetPath)
        {
            var externalResourcesPath = GetExternalResourcesPath();
            var shareResourcesPath    = GetShareResourcesPath();

            var targetPaths = new string[]
            {
                externalResourcesPath,
                shareResourcesPath,
            };

            foreach (var targetPath in targetPaths)
            {
                if (string.IsNullOrEmpty(targetPath))
                {
                    continue;
                }

                if (!assetPath.StartsWith(targetPath))
                {
                    continue;
                }

                var infos = assetManagement.GetAssetInfos(assetPath);

                foreach (var info in infos)
                {
                    ApplyAssetBundleName(externalResourcesPath, shareResourcesPath, info);
                }
            }
        }
Exemple #2
0
        private void AddAssetInfo(string path)
        {
            var infos = assetManagement.GetAssetInfos(path);

            foreach (var info in infos)
            {
                assetInfos = assetInfos.Append(info).ToArray();

                changeAssetInfo = true;
            }
        }