-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when assigning unnamed GDScript with exported variables #75764
Comments
I guess it's a regression from #75472. |
That sounds right, from the stack trace I was looking at it seemed to specifically be related to |
So the error is in line 2779: https://github.com/godotengine/godot/blob/master/editor/editor_inspector.cpp#L2761-L2782
I don't know enough about this part to be helpful :) |
I'm working on a fix for one :) |
Here you get the same error even if you assign a value:
Deselect / select the Node with the attached script: ERROR: Class name cannot be empty. Note: Seems to be undocumented, no idea if it is still supported ... |
Godot version
master
System information
W11
Issue description
This issue only happens in
master
, it does not occur in 4.0.2 so it is a recent regression.When assigning a script without a
class_name
and with at least one@export
variable to a node in the scene tree (and every time you save the script after), you will get an error:Class name cannot be empty
.The error appears to originate from the first line of
Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p_fallback)
:ERR_FAIL_COND_V_MSG(p_class.is_empty(), nullptr, "Class name cannot be empty.");
Steps to reproduce
Create a script with
Then assign it to a node in your scene. The error will occur. Remove the
@export
and it will no longer occur. Add it again, and it will, every time you save the file.Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: