DbgNode GetNode(object owner, string path) { DbgObjectData data = GetData(owner); if (data == null) { return(null); } return(GetNode(data, path)); }
void SetNodeValue(object owner, string path, DbgNodeValue value, object refValue = null) { DbgObjectData data = GetOrAddData(owner); DbgNode node = GetNode(data, path); if (node == null) { node = AddNode(data, path); data.lookup[path] = node; } node.value = value; node.refValue = refValue; }
DbgNode AddNode(DbgObjectData data, string path) { string[] comps = path.Split('.'); int compIndex = 0; List <DbgNode> nodes = data.roots; DbgNode node = null; while (compIndex < comps.Length) { string comp = comps[compIndex]; node = GetOrAdd(comp, nodes); nodes = node.children; ++compIndex; } return(node); }
void ClearNode(object owner, string path) { DbgObjectData data = GetData(owner); if (data == null) { return; } DbgNode node = GetNode(data, path); if (node == null) { return; } node.value = default(DbgNodeValue); node.refValue = null; data.lookup.Remove(path); }
public void SystemOnGUI() { foreach (var kvp in nodes) { object owner = kvp.Key; DbgObjectData data = kvp.Value; var ueOwner = owner as UE.Object; if (ueOwner != null) { GUILayout.Label(GarbageCache.GetName(ueOwner)); } else { GUILayout.Label(owner.ToString()); } for (int i = 0; i < data.roots.Count; i++) { DbgNode node = data.roots[i]; DrawNode(node, indent: 1); } } }
DbgNode GetNode(DbgObjectData data, string path) { return(data.lookup.FindOrNull(path)); }