private static FrameDebuggerEventData GetFrameEventData() { FrameDebuggerEventData debuggerEventData; FrameDebuggerUtility.INTERNAL_CALL_GetFrameEventData(out debuggerEventData); return(debuggerEventData); }
private static FrameDebuggerEventData GetFrameEventData() { FrameDebuggerEventData result; FrameDebuggerUtility.INTERNAL_CALL_GetFrameEventData(out result); return(result); }
public override void FetchData() { var rootLevel = new FDTreeHierarchyLevel(0, 0, string.Empty, null); // Hierarchy levels of a tree being built var eventStack = new List <FDTreeHierarchyLevel>(); eventStack.Add(rootLevel); int hierarchyIDCounter = -1; for (var i = 0; i < m_FrameEvents.Length; ++i) { // This will be a slash-delimited string, e.g. Foo/Bar/Baz. // Add "/" in front to account for the single (invisible) root item // that the TreeView always has. string context = "/" + (FrameDebuggerUtility.GetFrameEventInfoName(i) ?? string.Empty); string[] names = context.Split('/'); // find matching hierarchy level int level = 0; while (level < eventStack.Count && level < names.Length) { if (names[level] != eventStack[level].item.displayName) { break; } ++level; } // close all the further levels from previous events in the stack while (eventStack.Count > 0 && eventStack.Count > level) { CloseLastHierarchyLevel(eventStack, i); } // add all further levels for current event for (var j = level; j < names.Length; ++j) { var parent = eventStack[eventStack.Count - 1]; var newLevel = new FDTreeHierarchyLevel(eventStack.Count - 1, --hierarchyIDCounter, names[j], parent.item); parent.children.Add(newLevel.item); eventStack.Add(newLevel); } // add leaf event to current level var eventGo = FrameDebuggerUtility.GetFrameEventGameObject(i); var displayName = eventGo ? " " + eventGo.name : string.Empty; FDTreeHierarchyLevel parentEvent = eventStack[eventStack.Count - 1]; var leafEventID = i + 1; var item = new FDTreeViewItem(leafEventID, eventStack.Count - 1, parentEvent.item, displayName); item.m_FrameEvent = m_FrameEvents[i]; parentEvent.children.Add(item); ++parentEvent.item.m_ChildEventCount; } while (eventStack.Count > 0) { CloseLastHierarchyLevel(eventStack, m_FrameEvents.Length); } m_RootItem = rootLevel.item; }
private void PingFrameEventObject(int selectedID) { Object obj = FrameDebuggerUtility.GetFrameEventObject(selectedID - 1); if (obj != null) { EditorGUIUtility.PingObject(obj); } m_FrameDebugger.DrawSearchField(string.Empty); }
public override void FetchData() { FDTreeHierarchyLevel level = new FDTreeHierarchyLevel(0, 0, string.Empty, null); List <FDTreeHierarchyLevel> eventStack = new List <FDTreeHierarchyLevel> { level }; int num = -1; for (int i = 0; i < this.m_FrameEvents.Length; i++) { string frameEventInfoName = FrameDebuggerUtility.GetFrameEventInfoName(i); if (frameEventInfoName == null) { } char[] separator = new char[] { '/' }; string[] strArray = ("/" + string.Empty).Split(separator); int index = 0; while ((index < eventStack.Count) && (index < strArray.Length)) { if (strArray[index] != eventStack[index].item.displayName) { break; } index++; } while ((eventStack.Count > 0) && (eventStack.Count > index)) { CloseLastHierarchyLevel(eventStack, i); } for (int j = index; j < strArray.Length; j++) { FDTreeHierarchyLevel level2 = eventStack[eventStack.Count - 1]; FDTreeHierarchyLevel level3 = new FDTreeHierarchyLevel(eventStack.Count - 1, --num, strArray[j], level2.item); level2.children.Add(level3.item); eventStack.Add(level3); } GameObject frameEventGameObject = FrameDebuggerUtility.GetFrameEventGameObject(i); string displayName = (frameEventGameObject == null) ? string.Empty : (" " + frameEventGameObject.name); FDTreeHierarchyLevel level4 = eventStack[eventStack.Count - 1]; int id = i + 1; FrameDebuggerTreeView.FDTreeViewItem item = new FrameDebuggerTreeView.FDTreeViewItem(id, eventStack.Count - 1, level4.item, displayName) { m_FrameEvent = this.m_FrameEvents[i] }; level4.children.Add(item); level4.item.m_ChildEventCount++; } while (eventStack.Count > 0) { CloseLastHierarchyLevel(eventStack, this.m_FrameEvents.Length); } base.m_RootItem = level.item; }
public override void FetchData() { FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel fDTreeHierarchyLevel = new FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel(0, 0, string.Empty, null); List <FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel> list = new List <FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel>(); list.Add(fDTreeHierarchyLevel); int num = -1; for (int i = 0; i < this.m_FrameEvents.Length; i++) { string text = "/" + (FrameDebuggerUtility.GetFrameEventInfoName(i) ?? string.Empty); string[] array = text.Split(new char[] { '/' }); int num2 = 0; while (num2 < list.Count && num2 < array.Length) { if (array[num2] != list[num2].item.displayName) { break; } num2++; } while (list.Count > 0 && list.Count > num2) { FrameDebuggerTreeView.FDTreeViewDataSource.CloseLastHierarchyLevel(list, i); } for (int j = num2; j < array.Length; j++) { FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel fDTreeHierarchyLevel2 = list[list.Count - 1]; FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel fDTreeHierarchyLevel3 = new FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel(list.Count - 1, --num, array[j], fDTreeHierarchyLevel2.item); fDTreeHierarchyLevel2.children.Add(fDTreeHierarchyLevel3.item); list.Add(fDTreeHierarchyLevel3); } GameObject frameEventGameObject = FrameDebuggerUtility.GetFrameEventGameObject(i); string displayName = (!frameEventGameObject) ? string.Empty : (" " + frameEventGameObject.name); FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel fDTreeHierarchyLevel4 = list[list.Count - 1]; int id = i + 1; FrameDebuggerTreeView.FDTreeViewItem fDTreeViewItem = new FrameDebuggerTreeView.FDTreeViewItem(id, list.Count - 1, fDTreeHierarchyLevel4.item, displayName); fDTreeViewItem.m_FrameEvent = this.m_FrameEvents[i]; fDTreeHierarchyLevel4.children.Add(fDTreeViewItem); fDTreeHierarchyLevel4.item.m_ChildEventCount++; } while (list.Count > 0) { FrameDebuggerTreeView.FDTreeViewDataSource.CloseLastHierarchyLevel(list, this.m_FrameEvents.Length); } this.m_RootItem = fDTreeHierarchyLevel.item; }
public override void FetchData() { FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel treeHierarchyLevel1 = new FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel(0, 0, string.Empty, (FrameDebuggerTreeView.FDTreeViewItem)null); List <FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel> eventStack = new List <FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel>(); eventStack.Add(treeHierarchyLevel1); int num = -1; for (int index1 = 0; index1 < this.m_FrameEvents.Length; ++index1) { string[] strArray = ("/" + (FrameDebuggerUtility.GetFrameEventInfoName(index1) ?? string.Empty)).Split('/'); int index2 = 0; while (index2 < eventStack.Count && index2 < strArray.Length && !(strArray[index2] != eventStack[index2].item.displayName)) { ++index2; } while (eventStack.Count > 0 && eventStack.Count > index2) { FrameDebuggerTreeView.FDTreeViewDataSource.CloseLastHierarchyLevel(eventStack, index1); } for (int index3 = index2; index3 < strArray.Length; ++index3) { FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel treeHierarchyLevel2 = eventStack[eventStack.Count - 1]; FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel treeHierarchyLevel3 = new FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel(eventStack.Count - 1, --num, strArray[index3], treeHierarchyLevel2.item); treeHierarchyLevel2.children.Add((TreeViewItem)treeHierarchyLevel3.item); eventStack.Add(treeHierarchyLevel3); } GameObject frameEventGameObject = FrameDebuggerUtility.GetFrameEventGameObject(index1); string displayName = !(bool)((UnityEngine.Object)frameEventGameObject) ? string.Empty : " " + frameEventGameObject.name; FrameDebuggerTreeView.FDTreeViewDataSource.FDTreeHierarchyLevel treeHierarchyLevel4 = eventStack[eventStack.Count - 1]; treeHierarchyLevel4.children.Add((TreeViewItem) new FrameDebuggerTreeView.FDTreeViewItem(index1 + 1, eventStack.Count - 1, treeHierarchyLevel4.item, displayName) { m_FrameEvent = this.m_FrameEvents[index1] }); ++treeHierarchyLevel4.item.m_ChildEventCount; } while (eventStack.Count > 0) { FrameDebuggerTreeView.FDTreeViewDataSource.CloseLastHierarchyLevel(eventStack, this.m_FrameEvents.Length); } this.m_RootItem = (TreeViewItem)treeHierarchyLevel1.item; }
public static bool GetFrameEventData(int index, out FrameDebuggerEventData frameDebuggerEventData) { frameDebuggerEventData = FrameDebuggerUtility.GetFrameEventData(); return(frameDebuggerEventData.frameEventIndex == index); }
public static void SetRenderTargetDisplayOptions(int rtIndex, Vector4 channels, float blackLevel, float whiteLevel) { FrameDebuggerUtility.INTERNAL_CALL_SetRenderTargetDisplayOptions(rtIndex, ref channels, blackLevel, whiteLevel); }