Add more nameof for finding and template code.

This commit is contained in:
Chandler Cox
2024-08-23 16:31:33 -05:00
parent 5307ea85b5
commit 22cf2570f5
2 changed files with 3 additions and 3 deletions

View File

@@ -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";

View File

@@ -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"