godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.7k stars 525 forks source link

Hot Reloading doesn't work when built with CMake #1542

Closed ytnuf closed 1 month ago

ytnuf commented 1 month ago

Godot version

4.2

godot-cpp version

4.2

System information

Fedora Linux 40

Issue description

If you build godot-cpp with CMake and use it for a GDExtension project, said project will not support hot reloading. Even if you specify the reloadable=true in the gdextension file.

Steps to reproduce

Minimal reproduction project

https://github.com/ytnuf/gdextension_example

Klaim commented 1 month ago

Indeed, one needs to add -DHOT_RELOAD_ENABLED to the CMake configuration to enable it (this is an immediate workaround you can use if you need to now) but no explicit options are currently setup for CMake, nor is it documented (or I just didnt find it?).