AdditionalPathsToSync issue - UGS

We have multiple subfolders in our root depot folder that we want to sync via UGS that live along side our project. We used the AdditionalPathsToSync setting in <Game>/Build/UnrealGameSync.ini and created sync filters to enable/disable paths depending on a developer’s needs. However, it turns out that this setting doesn’t work.

I found a similar thread here, however, it doesn’t appear this PR made it to 5.6 or 5.7. Also when applying the change in the PR it doesn’t appear to actually solve the issue, as the folders are not removed/added via the sync filters. We have validated that paths within the project directory (ex: <Game>/RawArtAssets/…) respond to sync filters properly.

Examples:

[Perforce]
+AdditionalPathsToSync=/clang/...
+AdditionalPathsToSync=/Acme/...

[Options]
# Override Platform Support: Linux to add /clang path
+SyncCategory=(UniqueId="f44b2d25-cbc0-4a8f-b6b3-e4a8125533dd", Name="Platform Support: Linux", Paths="/clang...;/Engine/Source/ThirdParty/.../Linux/...")
+SyncCategory=(UniqueId="{A2000523-BBC7-4D2C-88A4-50DA4E777EC6}", Name="Tools: Acme", Enable="false", Paths="/Acme/...")



Does this work for you? https://github.com/EpicGames/UnrealEngine/pull/12950

(EPS thread: [Content removed]

No, sadly, it does not. I also called out that thread in the OG post:

I found a similar thread here, however, it doesn’t appear this PR made it to 5.6 or 5.7. Also when applying the change in the PR it doesn’t appear to actually solve the issue, as the folders are not removed/added via the sync filters. We have validated that paths within the project directory (ex: <Game>/RawArtAssets/…) respond to sync filters properly.

Hi Simon,

The AdditionalPathsToSync always take precedence over any other sync paths including exclusions i.e. unchecked Sync Categories. It’s a way of enforcing a sync rule to always happen.

The easiest way to visualise how sync paths are resolved is to click on the “Show Combined Filter” button in the UGS Sync Filter dialog. This shows the order that sync paths are applied. As you can see the AdditionalPathsToSync will always appear at the bottom meaning they are applied despite any earlier sync filters which may try to exclude a path.

To achieve what you are after here you could use Custom View paths as these entries will always appear above the Sync Categories. I would recommend testing out removing the AdditionalPathsToSync and setting them in your Custom View instead.

Previously we did not have the concept of shareable Custom Views (they could only be manually set per user in the Sync Filter dialog) but as of UE 5.5 we added support for this through the Presets system.

To use this feature add a Presets section to your UnrealGameSync.ini file.

Here is an example of how to configure it:

[Presets]
+Preset=(Name="Default", Categories="7607c2fb-19dd-403a-afa3-bbf898248d6b,True") //Select the Sync Category with this Guid
+Preset=(Name="Default", Views="-/some/Path/...") // Add the following exclusion to the Custom View paths
+Preset=(Name="Default", Views="/another/path/...") // Add the following inclusion to the Custom View Paths

The preset can then be selected by each user by going to the Options => Presets window in UGS.

Select the preset from the dropdown and click the Select button to apply it.

Note that this presets system locks the user into the preset settings, so for example they would be unable to untick a sync category that had been set to true in the preset or remove a Custom View path that has been added.

We are working on a number of improvements to this system:

  • Support for auto setting a preset based on the selected .uproject
  • Adding preset selection to the Sync Filter dialog (as it’s current location is a bit hidden away)

Hope this helps.

Hi Raymond,

Thank you, this is exactly the kind of behaviour I was looking for. One follow-up question: is it possible to set defaults for my team using the preset system? Meaning, when opening a project in UGS, a certain preset is selected by default.

Hi Simon,

That’s something we have recently added internally and will be included in the 5.8 release (although it’s already up on https://github.com/EpicGames/UnrealEngine/tree/ue5\-main/Engine/Source/Programs/UnrealGameSync if you want to have a play with it).

A default preset is tied to a particular uproject file, any UGS tabs loading that project automatically select the preset.

Configuration of this can be done in the UnrealGameSync.ini file

[//Depot/Path/ToProject.uproject]
DefaultPreset=(Name="PresetName")