-
-
Notifications
You must be signed in to change notification settings - Fork 20.9k
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
Class names suddenly seen as invalid #83561
Comments
Can you please see if you have this happen on a more recent version like 4.1.2? Unfortunately there's little we can do for one off errors that can't be repeated |
Updating to 4.1.2 does not fix the issue in the project affected by it |
If you are able to figure out the steps to cause this, please provide them, or as a minimal reproduction project:
|
I have the same issue right now, it started after removing the As far as I can tell, I was able to manually replace |
Possibly related #83187
|
I have a reported case of this in a mixed C#/GDScript project. Most edits take place in an external editor so this seems to be related to the issue with |
From what I experienced, this issue is due to the global class not being able to compile completely. What must be done is to make sure to:
The GDScript engine currently cannot refer to global classes that didn't compile at least once. It registers the class as global class only after it has successfully compiled. Edit: I added the MRP into the issue description. 83561.zip |
Maybe would be fixed with #92303 ? |
Godot version
4.1.1 stable
System information
Godot v4.1.1.stable - Windows 10.0.22635 - Vulkan (Forward+) - integrated AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 31.0.22013.1002) - AMD Ryzen 7 7735U with Radeon Graphics (16 Threads)
Issue description
Suddenly all custom class names in my project (declared using
class_name
in scripts) produce this error:Parser Error: Could not parse global class "(the name of the class)" from "res://(path to the script the class comes from)".
and prevent the game from running.This is fixed by going to the script, erasing one letter from the class name, typing it again and saving, but I would have to do that for every single one, which doesn't sound like a fun way to spend my day.
Steps to reproduce
I am unable to reproduce this. Before it happened, I was trying to export my game before I noticed these errors but I'm not sure what caused it. I reverted to an older version that wasn't affected and retraced my steps, but I couldn't reproduce it.
An attempt to reproduce it is happening though.
Minimal reproduction project
Production edit: 83561.zip
The text was updated successfully, but these errors were encountered: