utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
576 stars 39 forks source link

Attach node script getting invalid path and invalid extension. #525

Closed subash1 closed 5 months ago

subash1 commented 10 months ago

Hi Guys,

image

Seems attach script by default with *.kt file extension filter. If i choose kotlin file, it ends up with unable to open script error.

i am using the version 0.7.2-4.1.2

Thanks in advance

CedNaru commented 10 months ago

Our bad. When we switched from using .kt to .gdj, we forgot to properly change this part of the editor, so it's still expecting a .kt. For now, you can just drag and drop scripts from the filesystem to a node as an alternative.

CedNaru commented 10 months ago

After digging a bit about how this Godot UI works, here what I found. The UI to create a script and/or attach it is the same. Behind the hood it's just using the implementations of ScriptLanguage registered to the engine to find the correct extension and templates. If you try to create an already existing script, it switch to "attach Node" mode.

Once you validate this window, there are 2 consequences: