18 protected PluginModel? Model;
19 public string TemplateSubfolder =>
"Plugin";
21 public void Generate(AbsolutePath templatesPath, AbsolutePath currentFolder,
string name,
EngineVersion ueVersion)
31 var projectMainPluginsFolder = project.Folder /
"Plugins";
32 var pluginsFolder = currentFolder.ToString().Contains(projectMainPluginsFolder)
34 : projectMainPluginsFolder;
36 if(!Directory.Exists(pluginsFolder))
37 Directory.CreateDirectory(pluginsFolder);
39 if(Directory.Exists(pluginsFolder / name))
41 throw new InvalidOperationException($
"The plugin folder of {name} already exists in project plugins.");
44 if(!Directory.Exists(templatesPath / TemplateSubfolder))
45 templatesPath = DefaultTemplateFolder;
47 var templateDir = templatesPath / TemplateSubfolder;
51 var srcFolder = pluginsFolder / name /
"Source";
52 Directory.CreateDirectory(srcFolder);