Dear Epic,
I have discovered an issue that was not present in 4.8.3 which makes distribution of plugins to other people very difficult.
The issue is that if the Intermediate folder of a plugin is deleted, than the plugin cannot be recompiled from that point onward using the project-level sln.
The error I get is this
PCH.HappyPluginPrivatePCH.h.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\Basic\Plugins\HappyPlugin\Intermediate\Build\Win64\UE4Editor\Development\HappyPlugin\PCH.HappyPluginPrivatePCH.h.cpp': No such file or directory
#Repro Steps
- Make a new project, blank C++
- Make a new plugin using the in-editor New Plugin tool new in 4.9.0
- Make the middle option, which is a new button added to level viewport
- Close editor and reopen it / restart using the plugin option
- After the plugin code is compiled and working in Editor (you’ll see new button on toolbar,
- Close Editor
- Open sln for project in VS
- Delete the plugin Intermediate folder as if preparing the plugin content for distribution
- Try to recompile the project that contains the newly created plugin (for Development Editor Win64)
Whatever you named the plugin you’ll get a compile error similar to this:
PCH.HappyPluginPrivatePCH.h.cpp
2>c1xx : fatal error C1083: Cannot open source file: 'C:\Users\\Documents\Unreal Projects\Basic\Plugins\HappyPlugin\Intermediate\Build\Win64\UE4Editor\Development\HappyPlugin\PCH.HappyPluginPrivatePCH.h.cpp': No such file or directory
This did not happen in 4.8.3
#Why this is a Big Deal
The Intermediate folders for plugins can often be around 1 GB in size, and should not be needed by many people, especially BP only projects.
It makes it very hard to store the plugin for distribution!
Plugin size without Intermediate = 72 MB
Plugin size with Intermediate = 924 MB
#Solution?
What is the solution for how we can distribute plugins without the Intermediate folder and still allow C++ users to recompile the plugin for their possibly custom engine version?