You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Don't use ERR_PRINT_ONCE() for runtime class error because it will hide errors
This commit is contained in:
@@ -522,7 +522,7 @@ Object *ClassDB::_instantiate_internal(const StringName &p_class, bool p_require
|
|||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (!p_require_real_class && ti->is_runtime && Engine::get_singleton()->is_editor_hint()) {
|
if (!p_require_real_class && ti->is_runtime && Engine::get_singleton()->is_editor_hint()) {
|
||||||
if (!ti->inherits_ptr || !ti->inherits_ptr->creation_func) {
|
if (!ti->inherits_ptr || !ti->inherits_ptr->creation_func) {
|
||||||
ERR_PRINT_ONCE(vformat("Cannot make a placeholder instance of runtime class %s because its parent cannot be constructed.", ti->name));
|
ERR_PRINT(vformat("Cannot make a placeholder instance of runtime class %s because its parent cannot be constructed.", ti->name));
|
||||||
} else {
|
} else {
|
||||||
ObjectGDExtension *extension = get_placeholder_extension(ti->name);
|
ObjectGDExtension *extension = get_placeholder_extension(ti->name);
|
||||||
return (Object *)extension->create_instance(extension->class_userdata);
|
return (Object *)extension->create_instance(extension->class_userdata);
|
||||||
|
|||||||
Reference in New Issue
Block a user