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: add support for registering virtual and abstract classes #66979

Merged
merged 1 commit into from
Oct 16, 2022

Conversation

rburing
Copy link
Member

@rburing rburing commented Oct 6, 2022

This is useful e.g. for GDExtension physics servers: they need to register a PhysicsDirectBodyState3DExtension (or PhysicsDirectBodyState2DExtension) class, which typically uses direct access to a body via a pointer, but if the class is registered normally then the editor crashes on startup because it instances the class (without setting the body pointer) and tries to find default values for properties.

Depends on godotengine/godot-cpp#883 for CI to pass.

@rburing rburing force-pushed the gdextension_abstract_class branch from a5ab47a to 8fb636b Compare October 6, 2022 11:54
@akien-mga akien-mga requested a review from a team October 6, 2022 11:58
@akien-mga akien-mga added this to the 4.0 milestone Oct 6, 2022
@rburing rburing marked this pull request as draft October 9, 2022 11:39
@rburing rburing force-pushed the gdextension_abstract_class branch from 8fb636b to 54253b4 Compare October 15, 2022 11:11
@rburing rburing changed the title GDExtension: add support for abstract classes GDExtension: add support for virtual and abstract classes Oct 15, 2022
@rburing rburing marked this pull request as ready for review October 15, 2022 11:44
@rburing rburing requested a review from bruvzg October 15, 2022 13:41
@rburing rburing force-pushed the gdextension_abstract_class branch from 54253b4 to 1d5aa74 Compare October 16, 2022 07:03
@akien-mga akien-mga merged commit 767f8fb into godotengine:master Oct 16, 2022
@akien-mga
Copy link
Member

Thanks!

@rburing rburing deleted the gdextension_abstract_class branch October 17, 2022 06:32
@rburing rburing changed the title GDExtension: add support for virtual and abstract classes GDExtension: add support for registering virtual and abstract classes Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants