|
|
|
|
|
|
ReloadCallHierarchy(); |
|
|
|
} |
|
|
|
GUILayout.FlexibleSpace(); |
|
|
|
m_TreeView.stringFilter = EditorGUILayout.DelayedTextField(m_TreeView.stringFilter, EditorStyles.toolbarSearchField); |
|
|
|
EditorGUI.BeginChangeCheck(); |
|
|
|
string filter = EditorGUILayout.DelayedTextField(m_TreeView.stringFilter, EditorStyles.toolbarSearchField); |
|
|
|
if(EditorGUI.EndChangeCheck()) |
|
|
|
{ |
|
|
|
m_TreeView.SetStringFilter(filter); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Rect buttonRect = GUILayoutUtility.GetRect(52, 16); |
|
|
|
if (GUI.Button(buttonRect, "Filter", EditorStyles.toolbarDropDown)) |
|
|
|
|
|
|
m_TreeView.SetAutoFilter(false); |
|
|
|
m_TreeView.SetFilter(Selection.activeGameObject); |
|
|
|
m_TreeView.SetObjectFilter(Selection.activeGameObject); |
|
|
|
m_TreeView.SetFilter(null); |
|
|
|
m_TreeView.stringFilter = string.Empty; |
|
|
|
m_TreeView.SetObjectFilter(null); |
|
|
|
m_TreeView.SetStringFilter(string.Empty); |
|
|
|
}); |
|
|
|
menu.AddSeparator(""); |
|
|
|
menu.AddItem(new GUIContent("Automatic Filter"), m_TreeView.AutoFilter, () => { |
|
|
|
|
|
|
m_Bindings = new Dictionary<int, CallTreeNode>(); |
|
|
|
} |
|
|
|
|
|
|
|
public string stringFilter { get { return m_StringFilter; } set { m_StringFilter = value; this.Reload(); } } |
|
|
|
public string stringFilter { get { return m_StringFilter; } } |
|
|
|
|
|
|
|
[SerializeField] |
|
|
|
GameObject m_filter = null; |
|
|
|
|
|
|
Selection.selectionChanged += UpdateAutoFilter; |
|
|
|
if(this.HasSelection()) |
|
|
|
{ |
|
|
|
SetFilter(m_Bindings[this.GetSelection()[0]].Target.gameObject); |
|
|
|
SetObjectFilter(m_Bindings[this.GetSelection()[0]].Target.gameObject); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
|
|
|
void UpdateAutoFilter() |
|
|
|
{ |
|
|
|
if (Selection.activeGameObject != null) |
|
|
|
SetFilter(Selection.activeGameObject); |
|
|
|
SetObjectFilter(Selection.activeGameObject); |
|
|
|
public void SetFilter(GameObject filter = null) |
|
|
|
public void SetObjectFilter(GameObject filter = null) |
|
|
|
Reload(); |
|
|
|
} |
|
|
|
|
|
|
|
public void SetStringFilter(string stringFilter) |
|
|
|
{ |
|
|
|
m_StringFilter = stringFilter; |
|
|
|
Reload(); |
|
|
|
} |
|
|
|
|
|
|
|