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

Directly get object instance ID from Variant and implement Variant::get_validated_object() #1591

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

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Sep 17, 2024

This will fix issue #1587 after Godot PR godotengine/godot#97119 is merged (which probably means Godot 4.4+)

It allows us to safely call Variant::operator ObjectID() even on objects that have been freed, and implements Variant::get_validated_object() which exists in Godot itself, and is a very convenient way to check if an object is valid.

Marking as a draft until PR godotengine/godot#97119 is merged

@dsnopek dsnopek added enhancement This is an enhancement on the current functionality waiting for Godot This issue needs a Godot Engine improvement to be solved labels Sep 17, 2024
@dsnopek dsnopek added this to the 4.x milestone Sep 17, 2024
@dsnopek dsnopek requested a review from a team as a code owner September 17, 2024 15:02
@dsnopek dsnopek marked this pull request as draft September 17, 2024 15:02
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 waiting for Godot This issue needs a Godot Engine improvement to be solved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant