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.
This commit is contained in:
parent
2e657e51f8
commit
2be8cd6863
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue