|
|
|
|
|
|
[MenuItem("Window/Gameplay Ingredients/Callable Tree Explorer", priority = MenuItems.kWindowMenuPriority)] |
|
|
|
static void OpenWindow() |
|
|
|
{ |
|
|
|
GetWindow<CallTreeWindow>(); |
|
|
|
s_Instance = GetWindow<CallTreeWindow>(); |
|
|
|
} |
|
|
|
|
|
|
|
public static bool visible = false; |
|
|
|
static CallTreeWindow s_Instance; |
|
|
|
|
|
|
|
private void OnDisable() |
|
|
|
{ |
|
|
|
visible = false; |
|
|
|
s_Instance = null; |
|
|
|
} |
|
|
|
|
|
|
|
private void OnEnable() |
|
|
|
|
|
|
titleContent = new GUIContent("Callable Tree Explorer"); |
|
|
|
ReloadCallHierarchy(); |
|
|
|
EditorSceneManager.sceneOpened += Reload; |
|
|
|
EditorSceneSetup.onSetupLoaded += ReloadSetup; |
|
|
|
visible = true; |
|
|
|
} |
|
|
|
|
|
|
|
void ReloadSetup(EditorSceneSetup setup) |
|
|
|
{ |
|
|
|
ReloadCallHierarchy(); |
|
|
|
} |
|
|
|
|
|
|
|
public static void Refresh() |
|
|
|
{ |
|
|
|
s_Instance.ReloadCallHierarchy(); |
|
|
|
s_Instance.Repaint(); |
|
|
|
} |
|
|
|
|
|
|
|
private void OnGUI() |
|
|
|
|
|
|
|
|
|
|
if (list.Count > 0) |
|
|
|
nodeRoots.Add(name, new List<CallTreeNode>()); |
|
|
|
else |
|
|
|
return; |
|
|
|
if (item.gameObject.scene == null || !item.gameObject.scene.isLoaded) |
|
|
|
continue; |
|
|
|
|
|
|
|
var stack = new Stack<object>(); |
|
|
|
|
|
|
|
if(typeof(T) == typeof(StateMachine)) |
|
|
|
|
|
|
public void SetFilter(GameObject filter = null) |
|
|
|
{ |
|
|
|
m_filter = filter; |
|
|
|
this.Reload(); |
|
|
|
Reload(); |
|
|
|
} |
|
|
|
|
|
|
|
protected override TreeViewItem BuildRoot() |
|
|
|