Repository navigation
Conversation
…rcall - Add direct Swift class instantiation support via GDScript .new() - Reflect concrete method argument and return types into Godot ClassDB - Extract clean parameter names and suppress duplicate selector aliases - Implement high-performance GDExtension ptrcall dispatch for typed calls - Add direct class sample scene and interactive toggle in example project
There was a problem hiding this comment.
Poing AI
Commit: ca27f716ae · Model: gemini-3.5-flash-lite
✅ Approved
Adds direct Swift class instantiation support with typed reflection and ptrcall capabilities for Godot GDExtension integration, along with accompanying sample scenes.
ℹ️ About Poing AI
Poing AI is an enterprise-grade AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.
Commands:
- Comment
/reviewor@poing-ai reviewon this PR to run a fresh review. - Comment
/fixor@poing-ai fixon this PR to trigger autonomous code repair.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #14
Summary
• Direct Swift Class Instantiation: Allows developers to instantiate registered Swift classes directly via GDScript
.new()(e.g.var plugin := GodotExamplePlugin.new()), completely eliminating the need for GDScript wrapper files andEngine.has_singleton().• ClassDB Parameter & Return Type Introspection: Extracts concrete argument counts, parameter names, and return types from Objective-C selectors in
GodotRuntimeDispatcherand populatesGodotClassDBmethod definitions so GDScript's compile-time signature checks pass without error.• High-Performance
ptrcallDispatch: Implements direct GDExtensionptrcalldispatch for typed class invocations, bypassing intermediateVariantconversions.• Clean Parameter Names & Duplicate Suppression: Parses selector component labels to produce idiomatic GDScript argument names (e.g.
add_numbers(a, b)instead ofarg0, arg1), and suppresses duplicate selector aliases that clash inClassDB.• Interactive Direct Sample Scene: Added
sample/direct_sample.tscnandsample/direct_sample.gdto demonstrate direct instance usage and dynamic runtime switching in the example project.Verification
swift test(All 9 unit tests passing)swift test --package-path example/apple(All 3 example tests passing)gdlint example/godot_editor/(0 lint warnings/errors)