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

Add typecasting to ObjectDB::get_instance() #1402

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TeagabC
Copy link

@TeagabC TeagabC commented Mar 4, 2024

I almost always get and instance from ObjectDB then immediately cast it to whatever type I want. Object::cast_to already does error checking so its easy to combine the two as a simple QOL

@TeagabC TeagabC requested a review from a team as a code owner March 4, 2024 02:15
@dsnopek
Copy link
Contributor

dsnopek commented Mar 5, 2024

Thanks!

However, one of the design goals of godot-cpp is to be as API compatible with Godot modules as possible, allowing GDExtensions to optionally be compiled as modules, and for code to freely move between modules and GDExtensions.

So, in order to add something like this to godot-cpp, support for it would first need to be added to Godot itself.

@AThousandShips AThousandShips added the enhancement This is an enhancement on the current functionality label Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants