private void CellGUI(Rect cellRect, TreeViewItem item, int column, ref RowGUIArgs args) { ExecuteResultTreeItem resultItem = item as ExecuteResultTreeItem; NodeExceptionItem exceptionItem = item as NodeExceptionItem; ExecuteGraphResult r = null; NodeException e = null; if (resultItem != null) { r = resultItem.Result; } else { r = exceptionItem.Result; e = exceptionItem.Exception; } switch (column) { case 0://Collapse/Expand { DefaultGUI.Label(cellRect, string.Empty, args.selected, args.focused); } break; case 1://Status { var rect = cellRect; if (e != null) { rect.x += 8f; } DefaultGUI.Label(rect, (r.IsAnyIssueFound) ? "Fail" : "Success", args.selected, args.focused); } break; case 2://Graph { var graphName = Path.GetFileNameWithoutExtension(r.GraphAssetPath); DefaultGUI.Label(cellRect, graphName, args.selected, args.focused); } break; case 3://Platform DefaultGUI.Label(cellRect, BuildTargetUtility.TargetToHumaneString(r.Target), args.selected, args.focused); break; case 4://Description if (e != null) { DefaultGUI.Label(cellRect, e.Reason, args.selected, args.focused); } else { DefaultGUI.Label(cellRect, string.Empty, args.selected, args.focused); } break; } }
public void SetSelectedExecuteResult(ExecuteGraphResult r, NodeException e) { m_selectedResult = r; m_selectedException = e; m_msgScrollPos = new Vector2(0f, 0f); }
public NodeExceptionItem(ExecuteGraphResult r, NodeException e) : base(s_id++, 1, string.Empty) { m_result = r; m_exception = e; displayName = string.Format("{0}:{1}", m_exception.Node.Name, m_exception.Reason); }
public ExecuteResultTreeItem(ExecuteGraphResult r) : base(s_id++, 0, string.Empty) { m_result = r; displayName = string.Format("{0}({1}):{2}", Path.GetFileNameWithoutExtension(r.GraphAssetPath), BuildTargetUtility.TargetToHumaneString(r.Target), (r.IsAnyIssueFound)?"Failed" : "Good"); }
public NodeExceptionItem(ExecuteGraphResult r, NodeException e) : base(s_id++, 1, string.Empty) { m_result = r; m_exception = e; displayName = $"{m_exception.Node.Name}:{m_exception.Reason}"; }