public void DrawCurves() { if (prevNode) { Rect rect = windowRect; rect.x += 20; rect.y = windowRect.y + windowRect.height / 2; rect.width = 1; rect.height = 1; ProfilerNodeView.DrawNodeCurve(prevNode.windowRect, rect, linkColor); } }
void InitIfNeeded() { InitButonStyles(); if (!m_Initialized) { m_nodeView = new ProfilerNodeView(this); // Register the callback for snapshots. UnityEditor.MemoryProfiler.MemorySnapshot.OnSnapshotReceived += IncomingSnapshot; m_Initialized = true; } }
public ProfilerNode(ProfilerNodeObjectInfo info, CrawledMemorySnapshot newUnpackedCrawl, ProfilerNodeView newParent, bool createChildNodes, ProfilerNode newPrevNode) { myInfo = info; nodeTitle = myInfo.memObject.caption; _unpackedCrawl = newUnpackedCrawl; parent = newParent; bCreateChildNodes = createChildNodes; prevNode = newPrevNode; _shortestPathToRootFinder = new ShortestPathToRootFinder(_unpackedCrawl); _primitiveValueReader = new PrimitiveValueReader(_unpackedCrawl.virtualMachineInformation, _unpackedCrawl.managedHeap); _shortestPath = _shortestPathToRootFinder.FindFor(info.memObject); }
void InitIfNeeded() { InitButonStyles(); if (!m_Initialized) { //Init the Node View m_nodeView = new ProfilerNodeView(this); #if UNITY_5_6_OR_NEWER // Check if it already exists (deserialized from window layout file or scriptable object) if (m_TreeViewState == null) { m_TreeViewState = new TreeViewState(); } var headerState = ProfilerTreeView.CreateDefaultMultiColumnHeaderState(multiColumnTreeViewRect.width); if (MultiColumnHeaderState.CanOverwriteSerializedFields(m_MultiColumnHeaderState, headerState)) { MultiColumnHeaderState.OverwriteSerializedFields(m_MultiColumnHeaderState, headerState); } m_MultiColumnHeaderState = headerState; var multiColumnHeader = new MultiColumnHeader(headerState); m_TreeModel = new TreeModel <MemoryElement>(GetData()); m_TreeView = new ProfilerTreeView(m_TreeViewState, multiColumnHeader, m_TreeModel); m_TreeView.doubleClickedCallback += OnDoubleClickCell; #endif // Register the callback for snapshots. UnityEditor.MemoryProfiler.MemorySnapshot.OnSnapshotReceived += IncomingSnapshot; if (_unpackedCrawl == null && _packedCrawled != null && _packedCrawled.valid) { Unpack(); } m_Initialized = true; } }