internal static void ExportPackageForConfig(AssetStoreUploadConfig uploadConfig)
        {
            var results = new List <string>();

            if (!uploadConfig.IsValid)
            {
                throw new ArgumentException("The selected upload config " + uploadConfig + " is not valid.");
            }

            currentUploadConfig = uploadConfig;

            foreach (var path in uploadConfig.GetExportPaths())
            {
                GetGUIDsPatch.AddChildrenToResults(results, path);
            }

            var exportFilename = "Temp/HybridPackage_" + Path.GetDirectoryName(AssetDatabase.GetAssetPath(uploadConfig))
                                 .Replace("\\", "/")
                                 .Replace("Assets/", "")
                                 .Replace("Packages/", "")
                                 .Replace("/", "_")
                                 .Trim('_')
                                 + ".unitypackage";

            PackagerExportPatch.ExportPackage(results.ToArray(), exportFilename);
        }
        static void OnGetPatches()
        {
            // safeguard, should be prevented by OnWillEnablePatch
            if (Helpers.GetAssetStoreToolsAssembly() == null)
            {
                return;
            }

            var harmony = new Harmony(nameof(AssetStoreToolsPatchProvider));

            PathValidationPatch.Patch(harmony);
            RootPathPatch.Patch(harmony);
            GetGUIDsPatch.Patch(harmony);
            PackagerExportPatch.Patch(harmony);
        }