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

Replace .NET detection code with ClassDB::class_exists("CSharpScript"). #94680

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jul 23, 2024

Fixes #94631

GodotSharp was unexposed in #91557 and has_singleton("GodotSharp") no longer works.

Copy link
Member

@raulsntos raulsntos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize we were using the GodotSharp singleton for these checks. Why are we checking .NET support like this, instead of something like #ifdef MODULE_MONO_ENABLED?

Also, in the macOS export plugin we probably should only enable the required entitlements when exporting a project with C#, since .NET builds can also export projects that don't use C# at all. Is it possible to set the preset options from an EditorExportPlugin1? If so, we can just do that in ExportPlugin.cs after we check that the project contains C#.

Anyway this would be follow-up work. For the 4.3 release, checking the CSharpScript class should work to fix the immediate regression.

Footnotes

  1. Maybe this requires https://github.com/godotengine/godot/pull/90782

@bruvzg
Copy link
Member Author

bruvzg commented Jul 24, 2024

Why are we checking .NET support like this, instead of something like #ifdef MODULE_MONO_ENABLED?

I guess to avoid including header from modules to the core parts of the engine.

@akien-mga akien-mga merged commit 25e5efa into godotengine:master Jul 24, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

arm64 .NET missing from macOS export 4.3
3 participants