private static void Export() { ToolExporter.SaveReleaseInfo(); AssetDatabase.ExportPackage( AssetDatabase.GetAllAssetPaths().Where(path => path == JsonReleaseInfo.VitDeckRootPath || path.StartsWith(JsonReleaseInfo.VitDeckRootPath + "/") && !ToolExporter.IgnorePattern.IsMatch(path)).ToArray(), Path.Combine(ToolExporter.DestinationFolderPath, ToolExporter.GetPackageName()) ); }
private static void SaveReleaseInfo() { File.WriteAllText(Path.Combine( Path.GetDirectoryName(Application.dataPath), JsonReleaseInfo.VitDeckRootPath, JsonReleaseInfo.JsonReleaseInfoPath ), JsonUtility.ToJson(new JsonReleaseInfo.ReleaseInfo() { version = ProductInfoUtility.GetVersion(), package_name = ProductInfoUtility.GetDeveloperLinkTitle(), download_url = $"{ProductInfoUtility.GetDeveloperLinkURL()}/releases/download/v{ProductInfoUtility.GetVersion()}/{ToolExporter.GetPackageName()}", }, true)); AssetDatabase.Refresh(); }