mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Expose instance_from_id to GDNative
This function is available to GDScript but not to GDNative. When exposed, it allows building more ergonomic safe abstractions over the GDNative APIs, and covers the use cases of the original PR. Close #28478. Supersedes #28791. Co-authored-by: Markus Ewald <cygon@nuclex.org>
This commit is contained in:
@@ -290,6 +290,9 @@ bool GDAPI godot_is_instance_valid(const godot_object *p_object);
|
||||
void GDAPI *godot_get_class_tag(const godot_string_name *p_class);
|
||||
godot_object GDAPI *godot_object_cast_to(const godot_object *p_object, void *p_class_tag);
|
||||
|
||||
// equivalent of GDScript's instance_from_id
|
||||
godot_object GDAPI *godot_instance_from_id(godot_int p_instance_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user