Beispiel #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();
        }
Beispiel #2
0
        /// <summary>Reverts the precompilation of this module.</summary>
        public void Revert()
        {
            // Clear exists:
            DllExists_ = -1;

            // Delete the .dll:
            if (Precompiled)
            {
                File.Delete(DllPath);
            }

            // Go through the source files and rename any which are ".preco". Do that like so:
            SourceFileSet files = GetFileSet();

            // Rename:
            files.Rename(false);

            // Inform the asset DB:
            AssetDatabase.Refresh();
        }