Ctrl + Dragging Variables doesn't work on Windows

Ctrl + Dragging variables from the window on the left into the script panel does not appear to work on Windows, at least not in 4.2.2. It will drop but not all of the declaration; namely the Default Type is not included (unless that’s not necessary/was a change in 4.2.2 from the one used in the vid, but I didn’t spot anything in the Release Notes).

Ah, I saw that topic when I was trying to figure out how this works.

It does indeed work properly, even in 4.2.2. There are two things that Bram doesn’t mention when he shows this:

  • First, you should make sure your insertion point (caret) is where you want it to be in the Script workspace. Otherwise the references tend to pop up just about anywhere you don’t want them to be.
  • Second, and less intuitive, is that Ctrl + LMB selects/deselects a node, and if the node is deselected, Ctrl + drag won’t work. Contrary to the topic, it doesn’t matter when Ctrl is held (I tested this just now); what matters is whether the node is selected when you start dragging.

Start with the node deselected, then Ctrl + drag; what you should find is that the click will select the node, and then it will follow with your drag. The same applies for selecting multiple nodes and dragging them all at once.

I also checked this just now and it worked fine on my end, so the only thing I can suggest is to double-check that you are using type hints in your editor settings (the tooltip for which specifically states that it will add these to @onready references made by Ctrl + drag). The setting is at Editor–>Editor Settings–>General–>Text Editor–>Completion–>Add Type Hints.

Best of luck; I know it can be frustrating when it feels like a feature of this kind doesn’t work the way it should. They probably should’ve mapped this to MMB + drag or something =)

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms