-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Can't access any methods of GDScript classes (except .new()) unless you first cast them as Script or GDScript #76414
Comments
seems like an error to me, since it's not even a script class, it's an inner class. |
Everything is still the same if Example is a class_name in a separate file. Also, |
No, they don't. And if they somehow do, it's an error. If you don't specify any base type, |
The object you get from Example.new() does not implement GDScript. Example itself absolutely does. I don't know if that's an error, but it is 100% what I am seeing. |
Yes, you are correct, of course. I got confused. |
Godot version
4.0.2
System information
Windows 11
Issue description
You can't use any methods of a class (except .new()) unless you explicitly cast it to Script or GDScript.
There is also some other... strangeness going on.
Likely related to #73140
Edit: You actually can't even access .new() outside of calling it.
Also, everything works out the same if Example is a class_name in its own file instead of an inner class.
Steps to reproduce
Attempt to access the methods of a GDScript-based class without first casting it to Script or GDScript.
Minimal reproduction project
MRP.zip
The text was updated successfully, but these errors were encountered: