public static void Show(Rect activatorPosition, IFuzzyOptionTree optionTree, Action <IFuzzyOption> callback) { Ensure.That(nameof(optionTree)).IsNotNull(optionTree); // Makes sure control exits DelayedTextFields before opening the window GUIUtility.keyboardControl = 0; if (instance != null) { instance.Close(); } else { instance = CreateInstance <FuzzyWindow>(); instance.Initialize(activatorPosition, optionTree, callback); } }
private void OnDisable() { instance = null; }
private void OnEnable() { instance = this; query = string.Empty; }