public override void DrawSearchGui() { string defTxt = "(select a tag)"; string newtag = defTxt; _tagMask = EditorGUIExtensions.TagMaskField("Tags:", _tagMask); //EditorGUILayout.TagField("Tags:", defTxt); if (newtag != defTxt) { _tags.Add(newtag); } base.DrawSearchGui(); }
public override string GetFilterText() { string searchInfo = ""; int allTags = (1 << InternalEditorUtility.tags.Length) - 1; if (_tagMask == ~0 || _tagMask == allTags || _tagMask == 0) { //searchInfo += "Any tag" + Environment.NewLine; } else { if (_tags.Count == 1) { searchInfo += "A tag of: "; } else if (_tags.Count > 1) { searchInfo += "One of the following tags: "; } _tags = EditorGUIExtensions.TaskMaskToTags(_tagMask); foreach (string tag in _tags) { searchInfo += tag + " "; } if (_tags.Count > 0) { searchInfo += Environment.NewLine; } } return(searchInfo); }
public override void DrawSearchGui() { _layerMask = EditorGUIExtensions.LayerMaskField("Layers:", _layerMask); base.DrawSearchGui(); }