/// <summary>
        /// Saves and exports this project.
        /// </summary>
        /// <param name="exportAssetZip">If the assets folder should be exported as an archive with the pack.</param>
        public static bool Export(bool exportAssetZip)
        {
            EditorSceneManager.SaveScene(SceneManager.GetActiveScene());

            var path = Path.Combine(Project.Value.ProjectDirectory, Project.Value.ProjectFile);

            if (Save() && AssetPack.CreateAssetBundle())
            {
                File.Copy(path, Path.Combine(Project.Value.ModDirectory, Project.Value.ProjectFile), true);

                var assetZipPath = Path.Combine(Project.Value.ModDirectory, "assets.zip");

                // Always delete the old file. It will get recreated if the user checked the checkbox.
                if (File.Exists(assetZipPath))
                {
                    File.Delete(assetZipPath);
                }

                if (exportAssetZip)
                {
                    Debug.Log(string.Format("Archiving {0} to {1}", Project.Value.ProjectDirectory, assetZipPath));

                    ArchiveHelper.CreateZip(assetZipPath, Project.Value.ProjectDirectory);
                }

                var previewImagePath = Path.Combine(Project.Value.ProjectDirectory, "Resources/preview.png");
                File.Copy(previewImagePath, Path.Combine(Project.Value.ModDirectory, "preview.png"), true);

                return(true);
            }

            Debug.LogWarning(string.Format("Failed saving project {0}", path));

            return(false);
        }