godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.41k stars 21.26k forks source link

Autoloads in editor are loaded before GDExtensions #98241

Open FireCatMagic opened 1 month ago

FireCatMagic commented 1 month ago

Tested versions

Godot v4.4.dev3 - Windows 10.0.19045 - Single-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 4050 Laptop GPU (NVIDIA; 32.0.15.6070) - 13th Gen Intel(R) Core(TM) i5-13500HX (20 threads)

System information

Godot v4.4.dev3 - Windows 10.0.19045 - Single-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 4050 Laptop GPU (NVIDIA; 32.0.15.6070) - 13th Gen Intel(R) Core(TM) i5-13500HX (20 threads)

Issue description

When in the editor and the editor initially starts up, autoload scripts are loaded before GDExtensions are initialized image I currently have this Autoload script that extends from my GDExtension class:

@tool # Ensures this singleton runs in editor
extends BopimoGame

This also seems to cause errors when exporting headlessly, it constantly spams prints from gdscript scripts about the gdextension classes not being found

Steps to reproduce

Minimal reproduction project (MRP)

see above

Calinou commented 1 month ago