private void OnGUI() { if (Console.CurrentInspectorNode == null) { int yOffset = 10; if (CurrentDisplayNode.Type == BaseNode.NodeType.Group) { GroupNode groupNode = CurrentDisplayNode as GroupNode; AddLabel(groupNode.FullName, 20, ref yOffset); } else if (CurrentDisplayNode.Type == BaseNode.NodeType.Invokable) { InvokableNode invokableNode = CurrentDisplayNode as InvokableNode; AddLabel(invokableNode.Invokable.Name, 20, ref yOffset); AddLabel(invokableNode.Invokable.Description, Screen.height - 20, ref yOffset); } } }
private TreeNode <BaseNode> CreateTweakerNode(TreeNode <BaseNode> parent, ITweakerObject obj) { BaseNode baseNode = null; if (obj is IInvokable) { baseNode = new InvokableNode(obj as IInvokable); } else if (obj is ITweakable) { baseNode = new TweakableNode(obj as ITweakable); } else if (obj is IWatchable) { baseNode = new WatchableNode(obj as IWatchable); } parent.Children.Add(baseNode); return(baseNode); }