示例#1
0
        private List <string> GetRawAssetMods(AssetSnapshot snapshot, string srcDir)
        {
            List <string> mod = new List <string>();

            foreach (string assetPath in EditorAssetUtil.ListAssetPaths(srcDir, FileType.All, true))
            {
                if (assetPath.EndsWithIgnoreCase(".meta") || Path.GetFileName(assetPath).StartsWith(".", StringComparison.Ordinal))
                {
                    continue;
                }

                AssetDigest digest = snapshot.GetAssetDigest(assetPath);
                if (digest.IsModified())
                {
                    mod.Add(assetPath);
                }
            }
            return(mod);
        }
示例#2
0
        private List <string> GetAssetMods(AssetSnapshot snapshot, string srcDir)
        {
            List <string> mods = new List <string>();

            string[] assetPaths = EditorAssetUtil.ListAssetPaths(srcDir, FileType.All, true);
            foreach (string assetPath in assetPaths)
            {
                if (assetPath.EndsWithIgnoreCase(".meta") ||
                    Path.GetFileName(assetPath).StartsWith(".", StringComparison.Ordinal) ||
                    assetPath.EndsWithIgnoreCase(".unity"))
                {
                    continue;
                }

                AssetDigest digest   = snapshot.GetAssetDigest(assetPath);
                bool        modified = IsDepModified(snapshot, digest);

                if (modified)
                {
                    mods.Add(assetPath);
                }
            }
            return(mods);
        }