-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
GDScript export of C# class not working #79727
Comments
Does this work with global classes, exports are restricted to global classes I believe, see here Can you confirm that this works with a GDScript script loaded in the same way, i.e. without Edit: If you can confirm that this also doesn't work with GDScript (as I assume) this is instead a documentation issue and should be made more clear |
Just use the name, |
Hello, I maintain the linked addon. For now, you should still be able to export from GDScript as a simple resource. Duck typing will ensure everything from @export var story : Resource
# For instance:
if story.GetCanContinue():
var current_text = story.Continue() |
Just as a heads-up, this is now the case in our v1.1.0. |
Closing as this should be fixed now with the latest version of the addon. |
Godot version
4.1.1-mono
System information
MacOS 12.3
Issue description
When I do this:
InkStory
is of typeCSharpScript
, and the editor showsThis prevents me from narrowing the export, because I can use a
Resource
instead, but I can't verify that resource is the correct type. I'm left with duck typing and an export interface that accepts any resource in my project.I know that this export would work in C#, so this appears to be an edgecase when loading C# classes into GDScript.
Steps to reproduce
Minimal reproduction project
The text was updated successfully, but these errors were encountered: