Merge pull request #59885 from Jayman2000/autoload-inheritance-message
This commit is contained in:
commit
db8e6bd83f
@ -406,7 +406,7 @@ Node *EditorAutoloadSettings::_create_autoload(const String &p_path) {
|
||||
} else if (script.is_valid()) {
|
||||
StringName ibt = script->get_instance_base_type();
|
||||
bool valid_type = ClassDB::is_parent_class(ibt, "Node");
|
||||
ERR_FAIL_COND_V_MSG(!valid_type, nullptr, "Script does not inherit a Node: " + p_path + ".");
|
||||
ERR_FAIL_COND_V_MSG(!valid_type, nullptr, "Script does not inherit from Node: " + p_path + ".");
|
||||
|
||||
Object *obj = ClassDB::instantiate(ibt);
|
||||
|
||||
|
@ -2336,7 +2336,7 @@ bool Main::start() {
|
||||
} else if (script_res.is_valid()) {
|
||||
StringName ibt = script_res->get_instance_base_type();
|
||||
bool valid_type = ClassDB::is_parent_class(ibt, "Node");
|
||||
ERR_CONTINUE_MSG(!valid_type, "Script does not inherit a Node: " + info.path);
|
||||
ERR_CONTINUE_MSG(!valid_type, "Script does not inherit from Node: " + info.path);
|
||||
|
||||
Object *obj = ClassDB::instantiate(ibt);
|
||||
|
||||
|
@ -80,7 +80,7 @@ void init_autoloads() {
|
||||
} else if (script.is_valid()) {
|
||||
StringName ibt = script->get_instance_base_type();
|
||||
bool valid_type = ClassDB::is_parent_class(ibt, "Node");
|
||||
ERR_CONTINUE_MSG(!valid_type, "Script does not inherit a Node: " + info.path);
|
||||
ERR_CONTINUE_MSG(!valid_type, "Script does not inherit from Node: " + info.path);
|
||||
|
||||
Object *obj = ClassDB::instantiate(ibt);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user