public static void ValidateManifest(ManifestInstructions instructions) { if (instructions == false) { return; } var path = GetManifestPath(); var text = File.ReadAllText(path); if (instructions.TryReplacePackages(text, out string newText)) { Debug.Log("Manifest Packages Modified by " + nameof(ManifestModifier)); File.WriteAllText(path, newText); AssetDatabase.Refresh(); } }
private static void ManifestRefresh() { var instructions = ManifestInstructions.GatherAll(); if (instructions == null) { return; } if (instructions.Count < 1) { return; } foreach (var instruction in instructions) { if (instruction.IsThisEditor()) { ValidateManifest(instruction); break; } } }