private void OnDoubleClickCell(int id)
        {
            Debug.Log("ON CLICK CELL " + m_TreeView.GetSelection()[0]);
            MemoryElement tmp = m_TreeModel.Find(id);

            Debug.Log("ME: " + tmp.name);
            m_nodeView.CreateNode(tmp.memData, _unpackedCrawl);
        }
Example #2
0
 private void OnDoubleClickCell(int id)
 {
     if (m_TreeView.GetSelection().Count > 0)
     {
         MemoryElement tmp = m_TreeModel.Find(id);
         m_nodeView.CreateNode(tmp.memData, _unpackedCrawl);
     }
 }
        public static List <MemoryElement> GenerateRandomTree(int numTotalElements)
        {
            int numRootChildren = numTotalElements / 4;
            var treeElements    = new List <MemoryElement>(numTotalElements);

            var root = new MemoryElement("Aircraft_1", -1, 700, "Texture2D", "NativeUnityEngineObject", 10.7f);

            treeElements.Add(root);
            for (int i = 0; i < numRootChildren; ++i)
            {
                root = new MemoryElement("Aircraft_" + i, 0, 700 + i, "Texture2D", "NativeUnityEngineObject", 10.7f + i);
                treeElements.Add(root);
            }

            return(treeElements);
        }
        private IList <MemoryElement> populateData(int numTotalElements)
        {
            var treeElements = new List <MemoryElement>(numTotalElements + 1);
            var root         = new MemoryElement("Root", -1, 0, "Root", "Root", 0f);

            treeElements.Add(root);

            if (_unpackedCrawl == null)
            {
                return(treeElements);
            }

            ThingInMemory[] tmp = _unpackedCrawl.allObjects;

            for (int i = 0; i < numTotalElements; ++i)
            {
                if (tmp[i] is NativeUnityEngineObject)
                {
                    NativeUnityEngineObject nuo = tmp[i] as NativeUnityEngineObject;
                    root = new MemoryElement(nuo.caption, 0, nuo.instanceID, nuo.className, "Native", tmp[i].size);
                }
                else if (tmp[i] is ManagedObject)
                {
                    ManagedObject mo = tmp[i] as ManagedObject;
                    root = new MemoryElement(mo.caption, 0, 0, "Managed", "Managed", mo.size);
                }
                else if (tmp[i] is GCHandle)
                {
                    GCHandle gch = tmp[i] as GCHandle;
                    root = new MemoryElement(gch.caption, 0, 0, "GC Handle", "GC Handle", gch.size);
                }
                else if (tmp[i] is StaticFields)
                {
                    StaticFields sf = tmp[i] as StaticFields;
                    root = new MemoryElement(sf.caption, 0, 0, "GC Handle", sf.typeDescription.name, sf.size);
                }
                root.memData = tmp[i];
                treeElements.Add(root);
            }

            return(treeElements);
        }
        private IList <MemoryElement> populateData(int numTotalElements)
        {
            var treeElements = new List <MemoryElement>(numTotalElements + 1);
            var root         = new MemoryElement("Root", -1, 0, "Root", "Root", 0f);

            treeElements.Add(root);

            if (_unpackedCrawl == null)
            {
                return(treeElements);
            }

            ThingInMemory[] tmp = _unpackedCrawl.allObjects;

            for (int i = 0; i < numTotalElements; ++i)
            {
                root         = new MemoryElement(tmp[i].caption, 0, tmp[i].instanceID, tmp[i].className, tmp[i].type, tmp[i].size);
                root.memData = tmp[i];
                treeElements.Add(root);
            }

            return(treeElements);
        }