Hi,
We are using External Data Layers to segment content in our maps that is only included in certain build flavors. So far this works well, however we are seeing some confusing Editor behavior which is resulting in people accidentally assigning things to the wrong DataLayers. I was wondering if this is intentional or a bug?
Specifically, the code in UExternalDataLayerManager::GetMatchingExternalDataLayerAssetForObjectPath and the check here
if (FPackageName::GetPackageMountPoint(ExternalDataLayerAsset->GetPackage()->GetName()) == MountPoint)
{
Candidates.Add(ExternalDataLayerAsset);
}
This makes sense if you are using GameFeature plugins where the EDL should be applied to all content from the GFP when that content is placed in maps in /Game/, however it’s even applied for maps inside the plugin which defines the EDL which seems incorrect since it means everything inside the plugin is basically put in the EDL unconditionally
Also, if you register an EDL in your game content (for example by calling UExternalDataLayerEngineSubsystem::RegisterExternalDataLayerAsset from your game’s UAssetManager subclass) this means that anything you drag from your game content gets put in it implicitly, which is not usually desired. But then for example adding a new actor from the Place Actors Menu doesn’t have the EDL applied, even if it is a class defined in the GameFeaturePlugin.
It seems like possibly the paths which call GetMatchingExternalDataLayerAssetForObjectPath passing the actor’s class, like UDataLayerEditorSubsystem::GetActorSpawningExternalDataLayerInstance, need to also consider the mount point of the level the actor is placed into? For example, the following scenarios:
- EDL is /PluginA/EDL_Feature, Class is /PluginA/BP_Something, Map is /Game/Map_Test - EDL_Feature is applied, this is what we would expect
- EDL is /Game/EDL_Feature, Class is /Game/BP_Something, Map is /Game/Map_TestFeature - EDL_Feature is applied, but should it be implicitly? there is no cross-plugin reference. Maybe in a plugin, but for /Game/EDL_Feature, this is problematic since it basically is assigned to everything in the game.
- EDL is /PluginA/EDL_Feature, Class is /Script/PluginAModule.Something, Map is /Game/Map_Test - EDL_Feature is not applied, This seems inconsistent with 1) since if the plugin is disabled, /Script/PluginAModule.Something won’t exist.
It seems like the code needs to handle /Script paths to be consistent and also check that the map’s mount point is different from the EDL’s mount point? That said, maybe there is there is an element we are missing here since there isn’t a lot of documentation on EDLs yet.
Thanks,
Lucas
[Attachment Removed]