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
I am currently working on a plugin for managing my Rust project within the editor.
Describe the problem or limitation you are having in your project
My plugin is a EditorPlugin with a build() function. That build() function calls my compile script for my DLL(s). However, when the compile completes and it tries to overwrite the old DLL, Godot still has them loaded and it can't write to them. Unfocusing the Godot Editor window and running the compile script outside of Godot allows it to complete correctly.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add the ablity for a GDNative/GDExtention to be manually disabled/unloaded with GDScript. Perhaps adding a property likeGDNativeLibrary.loaded:bool that can be set to false. Or add unload() and reload() functions.
I haven't used Godot4+GDExtention yet. I don't know if this problem occurs with the new architecture.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
At present, it is not possible to update any code that compiles down to a DLL while Godot Editor has window focus.
For other languages to ever be editable within Godot Editor, like what I'm building, core functionality of manually unloading before they can be compiled is needed.
The text was updated successfully, but these errors were encountered:
Add the ablity for a GDNative/GDExtention to be manually disabled/unloaded with GDScript. Perhaps adding a property likeGDNativeLibrary.loaded:bool that can be set to false. Or add unload() and reload() functions.
In GDExtension, this can be achieved with the GDExtensionManager API, which has methods to load/reload/unload individual extensions. In addition, hot-reloading has been implemented in godotengine/godot#80284, so that the Godot editor automatically picks up new DLL versions.
Describe the project you are working on
I am currently working on a plugin for managing my Rust project within the editor.
Describe the problem or limitation you are having in your project
My plugin is a
EditorPlugin
with abuild()
function. Thatbuild()
function calls my compile script for my DLL(s). However, when the compile completes and it tries to overwrite the old DLL, Godot still has them loaded and it can't write to them. Unfocusing the Godot Editor window and running the compile script outside of Godot allows it to complete correctly.Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add the ablity for a GDNative/GDExtention to be manually disabled/unloaded with GDScript. Perhaps adding a property like
GDNativeLibrary.loaded:bool
that can be set to false. Or addunload()
andreload()
functions.I haven't used Godot4+GDExtention yet. I don't know if this problem occurs with the new architecture.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
At present, it is not possible to update any code that compiles down to a DLL while Godot Editor has window focus.
For other languages to ever be editable within Godot Editor, like what I'm building, core functionality of manually unloading before they can be compiled is needed.
The text was updated successfully, but these errors were encountered: