예제 #1
0
        public static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
        {
            if (!AssetBuildConfiger.GetInstance())
            {
                return;
            }

            if (!AssetBuildConfiger.GetInstance().isUseDependenciesCache)
            {
                return;
            }

            if (!AssetDependentCollector.GetInstance().IsLoaded)
            {
                return;
            }

            foreach (var assetPath in importedAssets)
            {
                AssetDependentCollector.GetInstance().AddRelation(assetPath);
            }
            foreach (var assetPath in deletedAssets)
            {
                AssetDependentCollector.GetInstance().RemoveRelation(assetPath);
            }
            for (int i = 0; i < movedAssets.Length; i++)
            {
                var srcPath  = movedFromAssetPaths[i];
                var destPath = movedAssets[i];
                AssetDependentCollector.GetInstance().MoveRelation(srcPath, destPath);
            }
        }
예제 #2
0
 private static AssetDependentCollector GetCollector()
 {
     return(AssetDependentCollector.GetInstance());
 }