public static void Main() { Project.UnityProjectRoot = @"D:\Projects\Juniper\examples\Juniper - Android"; var packageDB = AbstractPackage.Load(); var manifest = UnityPackageManifest.Load(); var platforms = Platforms.Load(); var pkg = (from versions in packageDB.Values from p in versions where p.Source == PackageSources.Juniper && p.Name.StartsWith("K", StringComparison.OrdinalIgnoreCase) select p) .FirstOrDefault(); pkg.Install(); //foreach (var package in platforms.Packages) //{ // PrintPackageOps(packageDB, manifest, package); //} //foreach (var configuration in platforms.Configurations.Values) //{ // WriteLine("============================"); // WriteLine(configuration.Name); // foreach (var package in configuration.Packages) // { // PrintPackageOps(packageDB, manifest, package); // } //} }
public override void Install() { var manifest = UnityPackageManifest.Load(); if (!ForRemoval) { manifest.Add(this); } else if (manifest.ContainsKey(PackageID)) { manifest.Remove(this); } }