Simple Drag and Drop Subgraphs (Unity Visual Scripting)
A downloadable subgraph node
This asset requires Unity editor version 2021.2.0b14 or greater and Unity Visual Scripting version 1.7.2 or greater.
This is a pair of subgraphs allowing you to easily setup drag and drop for UI elements. One graph goes on the object you want to drag and the other is placed on the area you want to be able to drop.
*Please note that the images of the subgraphs are not of the most recent version of this project.
Right-click an empty area in your project window. Select Import Package > Custom Package from the context menu. Find and open the Simple Drag and Drop unitypackage file then click Import on the window that opens.
Place Draggable subgraph on the UI object you'd like to drag and drop. Place DropZone subgraph on the UI element you'd like to accept the draggable object.
Enabled Bool controls whether the subgraph is enabled, turning the whole Draggable or DropZone subgraph on/off.
Trigger Outputs of each subgraph fire once when the corresponding event occurs.
Draggable object must have Layout Element and Canvas Group components.
Draggable uses object variables that are automatically created if they do not exist (on draggable object) of: placeholder, placeholderParent, ParentToReturnTo, newSiblingIndex
DropZone object must have Layout Group component.
DropZone requires Categories input data, even if it is an empty list. Matches ANY with Draggable Object Variable (List of String) named Categories.
DropZone uses object variables that are automatically created if they do not exist (on draggable object) of: placeholderParent, ParentToReturnTo
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.