I’ve been digging around the UnrealBuildTool code and noticed that it has some methods that are used to add projects to the solution it generates. However I do not see a way to access that from my <ProjectName>.[Build, Target].cs files. I would like to be able to add a project to that generated solution that has nothing to do with unreal, except that my code will use some calls/dlls defined there.
If I cannot add the actual project I would be happy if I could just add some Pre-Build event to just do a system call to msbuild.exe and build my external project. That would work fine, however I would then be left with Visual Studio not being able to find any of the included from that external project. I am aware that this will have no impact on the actual compiling since UnrealBuildTool has all the necessary paths specified in the <ProjectName>.Build.cs file. However, being able to add these include paths in some way that won’t get wiped by the re-generation of the solution would allow for some more sane viewing/editing the code within Visual Studio.
So to be clear:
- Can I add an external .vcxproj to my Unreal project so that it gets added to the .sln when it is generated but is not built by UnrealBuildTool (much like the UnrealBuildTool itself is added)?
- Can I add some kind of Pre-Build event that occurs before my Unreal project gets built?
- Can I add addition include paths to the Visual Studio Project that is generated for my Unreal project by Unreal in some manner that won’t get wiped when it is re-generated (this currently works fine for the IntelliSense include paths, but not the actual Include Directories entry)? This can also be expanded as perhaps just having the ability to specify a Property Sheet to the Unreal generated Visual Studio Project (which also gets wiped now).