You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What should happen:
Extensions of custom classes should work with no hassle when a project is imported
What actually happens:
Extensions of custom classes are invalid and must manually be redefined by changing the name and then undoing the change
Why this is an issue:
Sharing a project over git does not include the .godot folder. Something in the folder is what causes these custom class extensions to be registered for your local copy. So without it, these don't apply in the cloned project
Steps to reproduce
First, create a new class. In my example I have created a class called MyClass.
Then, extend this class.
(Optional) Extend that class again to demonstrate the error
I've put these 3 nodes in a scene, they all work
Classes show up in the node creation menu
Exit the project and delete the .godot folder
Relaunch the project
Upon relaunching, it'll display this error:
The extension of the custom class is also gone from the node creation scene. It's now invalid.
Change the name of the class then remove the name
I added an "H" to the end
It's returned!
Upon removing the H, the class returns to how it was before.
It's not that big of a hassle for a single script to go and rename the classes over again and then undo it, but for big projects this can get incredibly irritating.
For example, I recently sent my friend a copy of a project over git. It relies on a lot of custom classes, so when he opened it, he was surprised to find them invalid and had to go and manually alter the names of around 10 classes so he could alter the project.
* Broke with godotengine#72226
* Restored previous version of the code, made it even more error tolerant.
* Added a warning to **not** change the code.
Fixesgodotengine#72226.
Godot version
v4.0.beta16.official
System information
Windows 7 64-bit
Issue description
What should happen:
Extensions of custom classes should work with no hassle when a project is imported
What actually happens:
Extensions of custom classes are invalid and must manually be redefined by changing the name and then undoing the change
Why this is an issue:
Sharing a project over git does not include the .godot folder. Something in the folder is what causes these custom class extensions to be registered for your local copy. So without it, these don't apply in the cloned project
Steps to reproduce
I've put these 3 nodes in a scene, they all work
Classes show up in the node creation menu
Upon relaunching, it'll display this error:
The extension of the custom class is also gone from the node creation scene. It's now invalid.
I added an "H" to the end
It's returned!
Upon removing the H, the class returns to how it was before.
It's not that big of a hassle for a single script to go and rename the classes over again and then undo it, but for big projects this can get incredibly irritating.
For example, I recently sent my friend a copy of a project over git. It relies on a lot of custom classes, so when he opened it, he was surprised to find them invalid and had to go and manually alter the names of around 10 classes so he could alter the project.
Minimal reproduction project
CustomClassIssue.zip
The text was updated successfully, but these errors were encountered: