Skip to content

Custom extensions_api.json - Returned enum missing class identifier #1893

@Hestia-SGG

Description

@Hestia-SGG

Godot version

v4.5.1.stable.official [f62fdbde1]

godot-cpp version

4.5 (e83fd09)

System information

Windows 10, x86-64, AMD Ryzen 9 5900HX, NVidia GeForce RTX 3070

Issue description

When creating a custom extensions_api.json bindings to include information from the GodotSteam GDExtension, my custom GDExtension creates the C++ header and source files, but any time an enum is returned that is specific to the Steam class, it doesn't have Steam:: in front of it. For example, the return for Steam::getConnectedUniverse method was just Universe instead of Steam::Universe in the steam.cpp file.

Steps to reproduce

From scratch instructions:

  • Create an empty project in Godot 4.5.1
  • Download GodotSteam GDExtension 4.4+ from the Asset Store
  • Close the Godot Editor
  • Navigate to the project folder
  • Run godot --headless --dump-extension-api to generate the extension_api.json file (saved as steam_extension_api.json)
  • Copy this to a blank GDExtension C++ Template project
  • Build using scons platform=windows custom_api_file=steam_extension_api.json
  • Error as the generated steam.cpp file uses enums without the class identifier

Using minimal reproduction project:

  • Navigate to the demo subfolder
  • Run godot --headless --dump-extension-api to generate the extension_api.json file (saved as steam_extension_api.json)
  • Build using scons platform=windows custom_api_file=steam_extension_api.json

Minimal reproduction project

I have created a copy of my custom GDExtension with all code removed, and the demo project stripped to bare minimum. It includes the download of GodotSteam from the Asset Library at the time of this issue.

godotsteam_extension_enum_project.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions