コード例 #1
0
ファイル: AssetBuildRelationship.cs プロジェクト: cnscj/THSTG
        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
ファイル: AssetBuildRelationship.cs プロジェクト: cnscj/THSTG
 private static AssetDependentCollector GetCollector()
 {
     return(AssetDependentCollector.GetInstance());
 }