From 983eec5521280b7bc1e5da74e0c6f2737b55a2f8 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Mon, 4 Apr 2022 13:55:41 -0400 Subject: [PATCH] Improve autoload inheritance error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Autoloaded scripts should always inherit from Node. When you run a project that tries to autoload a script which doesn’t inherit from Node, then Godot gives an error. Before this change, the error said “Script does not inherit a Node”. That error message is a little bit misleading. If a class inherits a Node, then one of its superclasses has a Node. If a class inherits _from_ Node, then one of its superclasses is Node. This change corrects that mistake. Fixes #59884. (cherry picked from commit 1cc7e7ec33a652647d63cb32fa164eceef87c653) --- editor/editor_autoload_settings.cpp | 2 +- main/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index f27da09a4..a3541da7c 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -386,7 +386,7 @@ Node *EditorAutoloadSettings::_create_autoload(const String &p_path) { Ref