Exemple #1
0
        private static void OnWillSaveAssets(string[] pPaths)
        {
            TeneProjectWindow proj = Main.Enhancement <TeneProjectWindow>();

            if (proj != null)
            {
                proj.RefreshDependencies();
            }
        }
Exemple #2
0
        private static void OnPostprocessAllAssets(string[] pImported, string[] pDeleted, string[] pMoved, string[] pMoveFrom)
        {
            TeneProjectWindow proj = Main.Enhancement <TeneProjectWindow>();

            if (proj == null)
            {
                return;
            }

            string compilationList = "";

            foreach (string file in pImported)
            {
                string lower = file.ToLower();
                if (lower.EndsWith(".cs") || lower.EndsWith(".boo") || lower.EndsWith(".js"))
                {
                    compilationList += file + "\n";
                }

                proj.ClearCache(file);
            }

            if (compilationList.Length > 0)
            {
                File.WriteAllText(Common.TempRecompilationList, compilationList);
            }

            foreach (string file in pDeleted)
            {
                proj.ClearCache(file);
            }

            foreach (string file in pMoved)
            {
                proj.ClearCache(file);
            }

            foreach (string file in pMoveFrom)
            {
                proj.ClearCache(file);
            }
        }