Skip to content

Commit

Permalink
Merge pull request #70210 from raulsntos/dotnet/script-not-found-error
Browse files Browse the repository at this point in the history
C#: Add note about the class name in instantiate error
  • Loading branch information
neikeq authored Dec 17, 2022
2 parents 10bc1d8 + 2be8cd6 commit d44d0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/mono/csharp_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d44d0cc

Please sign in to comment.