Skip to content

Autoloads in editor are loaded before GDExtensions #98241

Open
@FireCatMagic

Description

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

  • Create a script that references GDExtension classes
  • Put the script as an autoload - make sure the @tool annotation is there so it can run in editor
  • Notice the script can't compile because it doesn't know the GDExtension class
  • Therefore the autoload won't load inside the editor
  • Opening the project settings dialogue after the GDExtension has loaded recompiles (i think?) the script and then allows it to work inside the editor

Minimal reproduction project (MRP)

see above

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions