Bug report viaUDN:
We have some plugins that we'd like to share between projects, that we don't want to maintain multiple copies of. The AdditionalPluginsDirectories option for Project's solves that for us, and is generally great.
The biggest issue we've had with it so far, however, is how these additional plugins get added to project files for IDEs (we've only tested with Rider and VS).
- Only source files get added. No /Config, /Resource, /Script, etc. directories are added to the filters. This includes the *.uplugin files themselves. This means that any plugin added under AdditionalPluginsDirectories does not appear the same as "normal" plugins.
- The Filters for the Additional Plugins are overly nested, including the full relative path. That's probably the safest thing to do in terms of naming collisions, but it makes it more of a hassle to work with in the Solution Explorer for the IDEs. Because the AdditionalPluginDirectories only looks for Plugins / Modules recursively BELOW the specified relative path, and because having plugins with the same name already causes issues with UE's build system, it seems like a decent alternative would be to remove the relative path and use a single "<Project>/AdditionalPluginsDirs" filter instead.
Rider and VS act slightly differently. While VS respects the Filter Groups and nests things appropriately, Rider opts to place any non-empty included directories directly underneath the Project.
However, if I make the following changes, I can see more desirable output:
- Inside Engine/Intermediates/ProjectFiles/<Project>.vcxproj
- Find the <ItemGroup> node.
- Add an <None> node for our *.uplugin file.
- <None Include="..\..\..\..\..\git\<REDACTED>\testclients\unreal\integration\Plugins\<REDACTED>\<REDACTED>.uplugin"/>
- Note, we should include any other Plugin Configs, Resources, etc. here as well.
- Inside Engine/Intermediates/ProjectFiles/<Project>.vcxproj.filters
- Find the <ItemGroup> node.
- Add a new <Filter> node for Additional Plugins (See Below)
- Replace any references to "../../../git/<REDACTED>/testclients/unreal/integration/Plugins", with "AdditionalPlugins"
- This process needs to be done for every AdditionalPluginsDirectory that's added in the *.uproject file.
- Make sure to add a <ClInclude> node for the *.uplugin files (See Below)