mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 03:04:31 +00:00
C#: Allow exporting games without C#
When exporting a game that contains a C# solution, a feature is added so the exported game can check if it should initialize the .NET module. Otherwise, the module initialization is skipped so games without C# won't check for the assemblies and won't show alerts when they're missing.
This commit is contained in:
parent
a574c0296b
commit
be1dfd3b3a
4 changed files with 38 additions and 12 deletions
|
|
@ -121,16 +121,16 @@ void CSharpLanguage::init() {
|
|||
GLOBAL_DEF(PropertyInfo(Variant::INT, "dotnet/project/assembly_reload_attempts", PROPERTY_HINT_RANGE, "1,16,1,or_greater"), 3);
|
||||
#endif
|
||||
|
||||
gdmono = memnew(GDMono);
|
||||
gdmono->initialize();
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (gdmono->is_runtime_initialized()) {
|
||||
gdmono->initialize_load_assemblies();
|
||||
}
|
||||
|
||||
EditorNode::add_init_callback(&_editor_init_callback);
|
||||
#endif
|
||||
|
||||
gdmono = memnew(GDMono);
|
||||
|
||||
// Initialize only if the project uses C#.
|
||||
if (gdmono->should_initialize()) {
|
||||
gdmono->initialize();
|
||||
}
|
||||
}
|
||||
|
||||
void CSharpLanguage::finish() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue