I have an Object and I want to check to ensure it is valid before manipulating it. Now I know the best thing to do in C++ is to properly manage my scope so that there is no possibility for the Object to be invalid, but the extension I am creating (well, porting) is a container and needs to provide that sanity check. Unfortunately, within a GDExtension I have no access to is_instance_valid
nor to any suitable method from ObjectDB. Here is what I have currently:
ERR_FAIL_COND_V_MSG(_iter_current == nullptr || _iter_current->get_instance_id() == 0, Variant(),
//etc.
I am not sure if this is sufficient, if it will even work, or if there is a better way. Can anyone help? Thanks!