diff --git a/Source/Editor/Surface/VisjectSurface.DragDrop.cs b/Source/Editor/Surface/VisjectSurface.DragDrop.cs
index 7cbbdc876..639d749c7 100644
--- a/Source/Editor/Surface/VisjectSurface.DragDrop.cs
+++ b/Source/Editor/Surface/VisjectSurface.DragDrop.cs
@@ -129,7 +129,12 @@ namespace FlaxEditor.Surface
/// The drag drop arguments data.
protected virtual void HandleDragDropParameters(List objects, DragDropEventArgs args)
{
- var arch = GetParameterGetterNodeArchetype(out var groupId);
+ // Try to get the setter node when holding the ALT key, otherwise get the getter node
+ if (!Input.GetKey(KeyboardKeys.Alt) || !TryGetParameterSetterNodeArchetype(out var groupId, out var arch))
+ {
+ arch = GetParameterGetterNodeArchetype(out groupId);
+ }
+
for (int i = 0; i < objects.Count; i++)
{
var parameter = GetParameter(objects[i]);
@@ -156,5 +161,18 @@ namespace FlaxEditor.Surface
groupId = 6;
return Archetypes.Parameters.Nodes[0];
}
+
+ ///
+ /// Tries to get the parameter setter node archetype to use.
+ ///
+ /// The group ID.
+ /// The node archetype.
+ /// True if a setter node exists.
+ protected virtual bool TryGetParameterSetterNodeArchetype(out ushort groupId, out NodeArchetype archetype)
+ {
+ groupId = 0;
+ archetype = null;
+ return false;
+ }
}
}
diff --git a/Source/Editor/Surface/VisualScriptSurface.cs b/Source/Editor/Surface/VisualScriptSurface.cs
index 00c34d8d5..ee0a3c6d6 100644
--- a/Source/Editor/Surface/VisualScriptSurface.cs
+++ b/Source/Editor/Surface/VisualScriptSurface.cs
@@ -187,6 +187,14 @@ namespace FlaxEditor.Surface
return Archetypes.Parameters.Nodes[2];
}
+ ///
+ protected override bool TryGetParameterSetterNodeArchetype(out ushort groupId, out NodeArchetype archetype)
+ {
+ groupId = 6;
+ archetype = Archetypes.Parameters.Nodes[3];
+ return true;
+ }
+
///
protected override void OnShowPrimaryMenu(VisjectCM activeCM, Float2 location, Box startBox)
{