Open vonagam opened 1 year ago
I guess https://github.com/godotengine/godot/pull/77911 would fix this.
I guess #77911 would fix this.
The case of preloaded scripts is addressed by it. Inner classes won't work and I'm not sure whether they should. From the docs:
Beware that resource files (.tres/.res) will store the path of the script they use in the file. When loaded, they will fetch and load this script as an extension of their type. This means that trying to assign a subclass, i.e. an inner class of a script (such as using the class keyword in GDScript) won't work. Godot will not serialize the custom properties on the script subclass properly.
But the error message could maybe be changed to something more meaningfull like Cannot get class. Are you using an inner class?
.
Godot version
master
System information
MacOS 10.15.7
Issue description
67614 added checks into create dialog and resource picker. Checks for create dialog were fixed as they were reported in #69889. But resource picker still has same problems "Cannot get class".
Steps to reproduce
Create a single node and attach this script. Select node and get errors about getting class. This is an example with resource as nested class, but another case is
MyResource
is another non-global script that is preloaded.Minimal reproduction project
N/A