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

@ -521,7 +521,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
for (const DeferredNodePathProperties &dnp : deferred_node_paths) {
// Replace properties stored as NodePaths with actual Nodes.
Node *base = Object::cast_to<Node>(ObjectDB::get_instance(dnp.base));
Node *base = ObjectDB::get_instance<Node>(dnp.base);
ERR_CONTINUE_EDMSG(!base, vformat("Failed to set deferred property '%s' as the base node disappeared.", dnp.property));
if (dnp.value.get_type() == Variant::ARRAY) {
Array paths = dnp.value;