From b14d88f8f8d06c95a19a44b80cfaef33b06f4b02 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 20 Nov 2023 07:31:16 -0600 Subject: [PATCH] Add git submodule init to git cloning. --- Source/Editor/Windows/PluginsWindow.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Source/Editor/Windows/PluginsWindow.cs b/Source/Editor/Windows/PluginsWindow.cs index 268c22581..372505795 100644 --- a/Source/Editor/Windows/PluginsWindow.cs +++ b/Source/Editor/Windows/PluginsWindow.cs @@ -391,6 +391,25 @@ namespace FlaxEditor.Windows } Editor.Log("Plugin project has been cloned."); + + try + { + // Start git submodule clone + var settings = new CreateProcessSettings + { + FileName = "git", + WorkingDirectory = clonePath, + Arguments = "submodule update --init", + ShellExecute = false, + LogOutput = true, + }; + Platform.CreateProcess(ref settings); + } + catch (Exception e) + { + Editor.LogError($"Failed Git submodule process. {e}"); + return; + } // Find project config file. Could be different then what the user named the folder. var files = Directory.GetFiles(clonePath);