UnityEssentials
Small but useful tools and features for Unity
QuickSearch.cs
Go to the documentation of this file.
1 #if UNITY_EDITOR
2 using UnityEditor.PackageManager;
3 using UnityEngine;
4 
5 namespace Essentials.EssentialsSettings.UnityConfigurationModifications
6 {
7 
8  public class QuickSearch : Adjustment
9  {
10  public override bool showInSettingsWindow { get => false; }
11  public override string title { get => "Install Quick Search"; }
12  public override string applyButtonText { get => "Add dependency"; }
13  public override string revertButtonText { get => "Remove dependency"; }
14  public override string infoURL { get => "https://docs.unity3d.com/Packages/com.unity.quicksearch@1.1/manual/index.html"; }
15 
19  public override void Apply()
20  {
21  Client.Add("com.unity.quicksearch");
22  Debug.Log("Installing Quick Search...");
23  }
24 
28  public override void Revert()
29  {
30  Client.Remove("com.unity.quicksearch");
31  Debug.Log("Uninstalling Quick Search...");
32  }
33 
34  public override string applyAdjustmentShortExplanation { get => "Install the Quick Search package adding a dependency in the project."; }
35  public override string revertAdjustmentShortExplanation { get => "Uninstall the Quick Search package by removing a dependency in the project."; }
36 
37 
38  }
39 
40 }
41 #endif