Merge pull request #76659 from shana/shana/75152-fix-crash-when-initializing-glue-generation

Skip initializing the C# runtime when generating glue bindings
This commit is contained in:
Yuri Sizov 2023-05-19 17:10:40 +02:00 committed by GitHub
commit 156a2fabea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -93,6 +93,12 @@ String CSharpLanguage::get_extension() const {
}
void CSharpLanguage::init() {
#ifdef TOOLS_ENABLED
if (OS::get_singleton()->get_cmdline_args().find("--generate-mono-glue")) {
print_verbose(".NET: Skipping runtime initialization because glue generation is enabled.");
return;
}
#endif
#ifdef DEBUG_METHODS_ENABLED
if (OS::get_singleton()->get_cmdline_args().find("--class-db-json")) {
class_db_api_to_json("user://class_db_api.json", ClassDB::API_CORE);