You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dragging and dropping a node to the script editor window ignores the currently opened file's language, and inserts a GDScript snippet into the .cs file. Either $ExampleNode, or @onready var example_node = $ExampleNode if done while holding Ctrl.
This is of course invalid code for C#.
Expected behavior: Either insert C# code or just do nothing if the active file's extension does not match .gd
Steps to reproduce
Create and attach a C# script to a node.
Drag and drop any node to the script window, to quick insert a reference to it.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
Last time I was looking at this code I was becoming convinced it needed some redesign. I think it could use some kind of language provider that would be used to generate code for different langauges. But that was beyond the scope of what I was doing (I fixed generating a typed expression, and was working on dragging and dropping a property from the inspector).
Tested versions
v4.2.2 Stable Mono [15073af]
System information
Windows 10 - Godot v4.2.2.stable.mono.official
Issue description
Dragging and dropping a node to the script editor window ignores the currently opened file's language, and inserts a GDScript snippet into the .cs file. Either
$ExampleNode
, or@onready var example_node = $ExampleNode
if done while holding Ctrl.This is of course invalid code for C#.
Expected behavior: Either insert C# code or just do nothing if the active file's extension does not match .gd
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: