Skip to content
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

[C#] Godot can't find C# mainloop #69795

Closed
Hromon opened this issue Dec 9, 2022 · 1 comment · Fixed by #72619
Closed

[C#] Godot can't find C# mainloop #69795

Hromon opened this issue Dec 9, 2022 · 1 comment · Fixed by #72619

Comments

@Hromon
Copy link

Hromon commented Dec 9, 2022

Godot version

4.0 beta 4 and beta 7

System information

Windows 10

Issue description

Godot can't find the C# mainloop, but if create a GDScript variant, then everything works

Steps to reproduce

Create C# script and inherit it from the mainloop and specify it in the settings.

Minimal reproduction project

TestProject.zip

@Chaosus Chaosus added this to the 4.0 milestone Dec 9, 2022
@raulsntos
Copy link
Member

It seems Godot looks for the type in ClassDB or global scripts. The .NET module currently supports neither way to register your type.

C# is currently implemented as a ScriptLanguage and therefore doesn't register C# types in ClassDB, in the future we want to allow implementing GDExtensions with C# which would register types in ClassDB.

For ScriptLanguages, such as GDScript, the type can be provided using global scripts. C# doesn't currently support this but there is a PR that adds support for this: #63126.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants