Пример #1
0
        /// <summary>Recompiles this module.</summary>
        public void Compile()
        {
            // Clear exists:
            DllExists_ = -1;

            // Write out the settings:
            WriteSettings();

            // Get the file set:
            SourceFileSet files = GetFileSet();

            // Rename the files, adding a "preco" extension:
            files.Rename(true);

            if (Precompiler.Build(this))
            {
                Debug.Log("Precompiled " + Name);
            }
            else
            {
                // Revert the files:
                files.Rename(false);
            }

            // Inform the asset DB:
            AssetDatabase.Refresh();
        }
Пример #2
0
        public void Backup()
        {
            // Make this a backup set:
            string path = Path;

            // Rename the precompile folder so it's now just a safety backup:
            if (Directory.Exists(path + "-Backup"))
            {
                // Delete an older backup.
                Precompiler.DeleteDirectory(path + "-Backup");
            }

            File.Move(path, path + "-Backup");
        }