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
Windows 11 - v4.1.1.stable.mono.official [bd6af8e]
Issue description
I am unable to reference C# static classes or static functions in GD Script.
Looking up tutorials for this workflow, it seems to have been trivial in Godot 3.x using preload to create a reference to the static class.
Several other posts and threads suggest this is broken in 4.X. I have tried things like ensuring the script is in the .csproj and nothing has worked.
When I try this in the latest version of Godot I get an error saying that Godot can't find the function I'm calling: Invalid call. Nonexistent function 'Foo' in base 'CSharpScript'.
Simple example project attached.
Steps to reproduce
Create a c# script using Godot.
Define a static class with a public static function.
Create a 2d scene node and attach a gdscript to it.
In that GDScript create a reference to the static class
Attempt to call the public static function using that reference.
Godot version
4.1.1.stable.mono.official
System information
Windows 11 - v4.1.1.stable.mono.official [bd6af8e]
Issue description
I am unable to reference C# static classes or static functions in GD Script.
Looking up tutorials for this workflow, it seems to have been trivial in Godot 3.x using preload to create a reference to the static class.
Several other posts and threads suggest this is broken in 4.X. I have tried things like ensuring the script is in the .csproj and nothing has worked.
When I try this in the latest version of Godot I get an error saying that Godot can't find the function I'm calling:
Invalid call. Nonexistent function 'Foo' in base 'CSharpScript'.
Simple example project attached.
Steps to reproduce
Create a c# script using Godot.
Define a static class with a public static function.
Create a 2d scene node and attach a gdscript to it.
In that GDScript create a reference to the static class
Attempt to call the public static function using that reference.
Minimal reproduction project
StaticClassProj.zip
The text was updated successfully, but these errors were encountered: