Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required virtual method ScriptLanguageExtension::_reload_scripts must be overidden #95770

Closed
Naros opened this issue Aug 18, 2024 · 0 comments · Fixed by #95730
Closed

Required virtual method ScriptLanguageExtension::_reload_scripts must be overidden #95770

Naros opened this issue Aug 18, 2024 · 0 comments · Fixed by #95730

Comments

@Naros
Copy link
Contributor

Naros commented Aug 18, 2024

Tested versions

4.3.stable

System information

Windows 11

Issue description

When a custom ScriptLanguageExtension is implemented and a hot-reload of scripts is triggered within the Godot editor, Godot will report the error:

ERROR: Required virtual method MyCustomScriptLanguage::_reload_scripts must be overridden before calling.
   at: _gdvirtual__reload_scripts_call (./core/object/script_language_extension.h:589)

This is because the _reload_scripts virtual method was added in the editor, but was never marked to be exposed to concrete implementations, which leads to this error since concrete implementations are unable to override it otherwise.

Steps to reproduce

  1. Create a custom ScriptLanguageExtension implementation and register it with Godot
  2. Start game with a simple scene with a GDScript script attached to a node
  3. While game is running, modify the GDScript and save, triggering a hot-reload of scripts
  4. Godot reports error because godot-cpp implementation cannot override _reload_scripts(Array,bool).

Minimal reproduction project (MRP)

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants