Closed dsnopek closed 2 weeks ago
This will fix issue https://github.com/godotengine/godot-cpp/issues/1587 after Godot PR https://github.com/godotengine/godot/pull/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.
Variant::operator ObjectID()
Variant::get_validated_object()
Marking as a draft until PR https://github.com/godotengine/godot/pull/97119 is merged
This will fix issue https://github.com/godotengine/godot-cpp/issues/1587 after Godot PR https://github.com/godotengine/godot/pull/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 implementsVariant::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 https://github.com/godotengine/godot/pull/97119 is merged