Open scotmcp opened 6 months ago
@scotmcp I don't understand what issue is being reported in here, please elaborate.
When grabbing a node and dropping into a script, it dropped just the reference to the node.
That's how it works, yes. What would you expect to happen instead? Preferably please provide a specific example for the current behavior vs expected behavior.
It is not casting the
@onready
variable.
@onready
variable is created only when dropping a node with Control key pressed. And it would be statically typed (casted) if text_editor/completion/add_type_hints
editor setting is enabled.
This seems to work find in windows, but is not working in linuxmint 21.3.
I'd guess you have text_editor/completion/add_type_hints
editor setting disabled on linux.
@kleonc This setting doesn't have any impact on this. At your suggestion, I tested this in both windows and linux to see if it would have an affect on the reported bug. As expected, this setting simply affects whether the variable type is identified...not whether a variable is cast or not.
The bug as described remains.
@scotmcp Sorry but your explanation is still a little unclear to me. So please confirm if I understood it right:
On Windows, after Ctrl-drop you're getting something like:
@onready var node_name: ClassName = $Path/To/NodeName
or (in case text_editor/completion/add_type_hints
is disabled):
@onready var node_name = $Path/To/NodeName
Meaning it works as expected.
On Linux, after Ctrl-drop you're getting something like (regardless of the text_editor/completion/add_type_hints
):
$Path/To/NodeName
Meaning it acts as if Ctrl was not pressed when dropping.
Did I get it right?
Did I get it right?
Yes you got it right
Can't reproduce on macOS 13.3.0 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (8 Threads) so this is a linux only bug
@kleonc This setting doesn't have any impact on this. At your suggestion, I tested this in both windows and linux to see if it would have an affect on the reported bug. As expected, this setting simply affects whether the variable type is identified...not whether a variable is cast or not.
The bug as described remains.
@scotmcp The same issue happened to me on Ubuntu 22. But when I pressed the second (right side) CTRL, that drag and drop worked. Try doing that
I can confirm that the right Ctrl+drop works, and left does not.
Godot v4.2.2.stable - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 Ti with Max-Q Design () - Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 Threads)
Tested versions
v4.2.1.stable.mono.flathub [b09f793f5]
System information
Godot v4.2.1.stable.mono (b09f793f5) - Freedesktop SDK 23.08 (Flatpak runtime) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 () - AMD Ryzen 7 5700X 8-Core Processor (16 Threads)
Issue description
When grabbing a node and CTRL-dropping into a script, it dropped just the reference to the node. It is not casting the
@onready
variable. This seems to work find in windows, but is not working in linuxmint 21.3.Steps to reproduce
Grab a node and drop into attached script.
Minimal reproduction project (MRP)
Test Project for Bug.tar.gz