diff options
author | Raul Santos <raulsntos@gmail.com> | 2022-12-17 19:59:56 +0100 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2022-12-17 20:02:01 +0100 |
commit | 2be8cd6863f0fd5daa9a98f0a96d53bc8d23ebd4 (patch) | |
tree | e36265f8b4bdebb95a9b4946bc978132e3b1acec | |
parent | 2e657e51f8818401f0a54a0df3d3e74446044b93 (diff) |
C#: Add note about the class name in instantiate error
Adds a note about the requirement that a C# class name must match the
script filename in which the they are defined to the instantiate error.
-rw-r--r-- | modules/mono/csharp_script.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index d0f52488bb..eca53c4831 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -2292,7 +2292,7 @@ bool CSharpScript::can_instantiate() const { // For tool scripts, this will never fire if the class is not found. That's because we // don't know if it's a tool script if we can't find the class to access the attributes. if (extra_cond && !valid) { - ERR_FAIL_V_MSG(false, "Cannot instance script because the associated class could not be found. Script: '" + get_path() + "'."); + ERR_FAIL_V_MSG(false, "Cannot instance script because the associated class could not be found. Script: '" + get_path() + "'. Make sure the script exists and contains a class definition with a name that matches the filename of the script exactly (it's case-sensitive)."); } return valid && extra_cond; |