From ce658acb22a0ba9b5eb3ef41177b37cd3f9cabed Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 22 Jan 2024 18:03:14 -0600 Subject: [PATCH] Dont include editor modules in auto generated git plugin pulling. --- Source/Editor/Windows/PluginsWindow.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Windows/PluginsWindow.cs b/Source/Editor/Windows/PluginsWindow.cs index eb04f07b8..5bb6ea492 100644 --- a/Source/Editor/Windows/PluginsWindow.cs +++ b/Source/Editor/Windows/PluginsWindow.cs @@ -775,8 +775,12 @@ namespace FlaxEditor.Windows var pluginModuleScriptPath = Path.Combine(subDir, pluginModuleName + ".Build.cs"); if (File.Exists(pluginModuleScriptPath)) { - gameScriptContents = gameScriptContents.Insert(insertLocation, $"\n options.PublicDependencies.Add(\"{pluginModuleName}\");"); - modifiedAny = true; + var text = await File.ReadAllTextAsync(pluginModuleScriptPath); + if (!text.Contains("GameEditorModule", StringComparison.OrdinalIgnoreCase)) + { + gameScriptContents = gameScriptContents.Insert(insertLocation, $"\n options.PublicDependencies.Add(\"{pluginModuleName}\");"); + modifiedAny = true; + } } }