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

@ -144,7 +144,7 @@ NodePath VisibleOnScreenEnabler3D::get_enable_node_path() {
}
void VisibleOnScreenEnabler3D::_update_enable_mode(bool p_enable) {
Node *node = static_cast<Node *>(ObjectDB::get_instance(node_id));
Node *node = ObjectDB::get_instance<Node>(node_id);
if (node) {
if (p_enable) {
switch (enable_mode) {