Add typecasting to ObjectDB::get_instance()

pull/1402/head
PhobicHD 2024-03-03 19:13:27 -07:00
parent e55b792fea
commit 0353c5149e
1 changed files with 5 additions and 0 deletions

View File

@ -119,6 +119,11 @@ public:
} }
return internal::get_object_instance_binding(obj); return internal::get_object_instance_binding(obj);
} }
template <typename T>
static T *get_instance(uint64_t p_object_id) {
return Object::cast_to<T>(ObjectDB::get_instance(p_object_id));
}
}; };
template <class T> template <class T>