Exemplo n.º 1
0
    DbgNode GetNode(object owner, string path)
    {
        DbgObjectData data = GetData(owner);

        if (data == null)
        {
            return(null);
        }

        return(GetNode(data, path));
    }
Exemplo n.º 2
0
    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;
    }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
    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);
    }
Exemplo n.º 5
0
    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);
            }
        }
    }
Exemplo n.º 6
0
 DbgNode GetNode(DbgObjectData data, string path)
 {
     return(data.lookup.FindOrNull(path));
 }