Ejemplo n.º 1
0
        public override void OnNodeUI(GraphGUI host)
        {
            base.NodeUI(host);

            var e = this.runtimeInstance as RobotConnectorNode;

            GUILayout.BeginHorizontal();
            GUILayout.EndHorizontal();

            if (pinStyle == null)
            {
                pinStyle           = new GUIStyle(Styles.pinOut);
                pinStyle.alignment = TextAnchor.MiddleRight;
            }

            int space = 50;

            foreach (var slot in this.outputSlots)
            {
                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                GUILayout.BeginArea(new Rect(256 - 50, 10 + space, 50, 30));
                host.LayoutSlot(slot, slot.title, true, false, true, pinStyle);
                GUILayout.EndArea();
                EditorGUILayout.EndHorizontal();

                space += 20;
            }
        }