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

GDExtension support #8

Open
2 of 9 tasks
dugramen opened this issue Nov 25, 2024 · 0 comments
Open
2 of 9 tasks

GDExtension support #8

dugramen opened this issue Nov 25, 2024 · 0 comments
Milestone

Comments

@dugramen
Copy link
Owner

dugramen commented Nov 25, 2024

Requires a lot

  • Redirect all res:// paths in .gdextension files
  • Redirect all relative paths in .gdextension files
  • Locate and load extensions with GDExtensionManager.load_extension()

GDExtension classes are available in ClassDB methods, but not gdscript's global scope

  • Detect added classes by diffing ClassDB.get_class_list() before and after loading extensions. Might have to manually unload and reload extensions
  • Codegen wrapper classes for all detected classes using ClassDB
    • _init() calls ClassDB.instantiate and stores a reference to the instance
    • All other methods and properties should correspond to that instance
    • _static_init() instantiates 1 shared instance just for static calls, since instances can access static methods
  • Build wrapper classes into 1 big wrapper class file, and include in processed gdscripts using the workaround Add all class_names as manual preloads to all processed gdscripts #9
@dugramen dugramen added this to the 2.0 (gap) milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant