示例#1
0
 public override void DrawDragAndDropPreview()
 {
     if (DragAndDropUtility.Is <FlowMacro>())
     {
         GraphGUI.DrawDragAndDropPreviewLabel(DragAndDropUtility.offsetedPosition, DragAndDropUtility.Get <FlowMacro>().name, typeof(FlowMacro).Icon());
     }
     else if (DragAndDropUtility.Is <StateMacro>())
     {
         GraphGUI.DrawDragAndDropPreviewLabel(DragAndDropUtility.offsetedPosition, DragAndDropUtility.Get <StateMacro>().name, typeof(StateMacro).Icon());
     }
 }
示例#2
0
        public override void DrawDragAndDropPreview()
        {
            if (DragAndDropUtility.Is <FlowMacro>())
            {
                GraphGUI.DrawDragAndDropPreviewLabel(DragAndDropUtility.offsetedPosition, DragAndDropUtility.Get <FlowMacro>().name, typeof(FlowMacro).Icon());
            }
            else if (DragAndDropUtility.Is <GameObject>())
            {
                var gameObject = DragAndDropUtility.Get <GameObject>();
                GraphGUI.DrawDragAndDropPreviewLabel(DragAndDropUtility.offsetedPosition, gameObject.name + "...", gameObject.Icon());
            }
            else if (DragAndDropUtility.Is <UnityObject>())
            {
                var obj  = DragAndDropUtility.Get <UnityObject>();
                var type = obj.GetType();
                GraphGUI.DrawDragAndDropPreviewLabel(DragAndDropUtility.offsetedPosition, type.HumanName() + "...", type.Icon());
            }
            else if (EditorVariablesUtility.isDraggingVariable)
            {
                var kind = EditorVariablesUtility.kind;
                var name = EditorVariablesUtility.declaration.name;

                string label;

                if (e.alt)
                {
                    label = $"Set {name}";
                }
                else if (e.shift)
                {
                    label = $"Check if {name} is defined";
                }
                else
                {
                    label = $"Get {name}";
                }

                GraphGUI.DrawDragAndDropPreviewLabel(DragAndDropUtility.offsetedPosition, label, BoltCore.Icons.VariableKind(kind));
            }
        }
示例#3
0
 public void DrawDragAndDropPreview()
 {
     GraphGUI.DrawDragAndDropPreviewLabel(new Vector2(edgePosition.x, outerPosition.yMax), "Replace with: " + DragAndDropUtility.Get <StateMacro>().name, typeof(StateMacro).Icon());
 }
 public override void DrawDragAndDropPreview()
 {
     GraphGUI.DrawDragAndDropPreviewLabel(DragAndDropUtility.offsetedPosition, DragAndDropUtility.Get <StateGraphAsset>().name, typeof(StateGraphAsset).Icon());
 }