diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs index 852fd99c5..d2aa85269 100644 --- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs @@ -261,7 +261,7 @@ namespace FlaxEditor.CustomEditors.Dedicated if (!file.Contains("GameProjectTarget")) continue; // Skip - if (file.Contains("Modules.Add(\"Game\")")) + if (file.Contains("Modules.Add(\"Game\")") || file.Contains("Modules.Add(nameof(Game))")) { // Assume Game represents the main game module moduleName = "Game"; diff --git a/Source/Editor/Editor.cpp b/Source/Editor/Editor.cpp index b9b0f1fd8..09253851c 100644 --- a/Source/Editor/Editor.cpp +++ b/Source/Editor/Editor.cpp @@ -226,7 +226,7 @@ bool Editor::CheckProjectUpgrade() " base.Init();\n" "\n" " // Reference the modules for game\n" - " Modules.Add(\"{0}\");\n" + " Modules.Add(nameof({0}));\n" " }}\n" "}}\n" ), codeName), Encoding::UTF8); @@ -242,7 +242,7 @@ bool Editor::CheckProjectUpgrade() " base.Init();\n" "\n" " // Reference the modules for editor\n" - " Modules.Add(\"{0}\");\n" + " Modules.Add(nameof({0}));\n" "{1}" " }}\n" "}}\n"