Factories registered to the PlacementSubsystem using
UPlacementSubsystem::RegisterAssetFactory will always be added to the end of the AssetFactories array. Which means if there are any existing registered factories that pass the `IAssetFactoryInterface::CanPlaceElementsFromAssetData` check done in `UPlacementSubsystem::FindAssetFactoryFromAssetData` then the first of those existing factories will be used instead of the newly registered factory.
Potential solutions to this include introducing sorting/ordering to the registered factories, similar to how UEditorEngine::InitEngine usesFCompareUActorFactoryByMenuPriority or adding a function similar to CanPlaceElementsFromAssetData in IAssetFactoryInterface called ShouldPlaceElementsFromAssetData that gets checked first and only returns true if that factory is the only one who should be placing that actor.
Expected Result: The breakpoint or log created in step 3 should occur because UNewVolumeFactory was used to place the actor
Actual Result: No log or breakpoint will be hit because UActorFactoryBoxVolume will actually be used to place the actor
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-197945 in the post.
1 |
Component | UE - Editor - Workflow Systems |
---|---|
Affects Versions | 5.4 |
Created | Oct 13, 2023 |
---|---|
Resolved | Oct 17, 2023 |
Updated | Jan 20, 2024 |