Improve support for repeated content structures across game and plugins #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Intention
Paths that match with
StartWith
requires us to add a new path for every plugin with content. The Modular Game Features plugin type in UE5 promotes a project structure with multiple plugins, and it quickly becomes cumbersome (and easy to forget) to configure new paths.By also supporting
EndsWith
andContains
as path match conditions it's now easy to set up conditions that works across both game content and plugin content directories.Demo
The match conditions path array is now two options instead of one path string. Unfortunately I had to remove the

ContentDir
meta. The default is one element ofContains
/UI/
:This allows us to use one filter instead of multiple.

Backwards compatibility
Having created a config before making these changes I could validate that it plays nicely with previous versions of the plugin.
The default

StartsWith
lets the path match as expected:The

DefaultGame.ini
only changes if something other than the pre-existing paths change. Here I added a new path withContains
to show how it diffs:Questions
ContentDir
when selectingStartsWith
, but it'd make the code much more complicated. Is it worth it?