Add templated version of ObjectDB::get_instance()

This commit is contained in:
kobewi 2025-03-27 14:42:42 +01:00
parent 594d64ec24
commit bc9d0c7835
49 changed files with 121 additions and 104 deletions

View file

@ -124,7 +124,7 @@ void SkeletonModification2DLookAt::_execute(float p_delta) {
}
if (target_node_reference == nullptr) {
target_node_reference = Object::cast_to<Node2D>(ObjectDB::get_instance(target_node_cache));
target_node_reference = ObjectDB::get_instance<Node2D>(target_node_cache);
}
if (!target_node_reference || !target_node_reference->is_inside_tree()) {
ERR_PRINT_ONCE("Target node is not in the scene tree. Cannot execute modification!");