UWorldPartitionSubsystem::IsStreamingCompleted returning the wrong query result when all cells in location are in DataLayers

When calling UWorldPartitionSubsystem::IsStreamingCompleted, if all cells returned are withing DataLayers, the streaming query will return the incorrect result.

This is because the following code will cause that cell to be skipped.

We currently have all our actors (including Landscape) in DataLayers, and I’m using the IsStreamingCompleted with Query state to check in an area is streamed in (Active) or streamed out (Unloaded).

The attached example project has an actor that:

  • When the area at it’s location is Active
    • Turns Green
    • Queries for it being Unloaded
  • When the area at it’s location is Unloaded
    • Turns Red
    • Queries for it being Active

The Actor can be found at StreamingProblem\Source\StreamingProblem\StreamingTester.cpp

This seems like it’s a problem within IsStreamingCompleted.

The function name and this block of code seem to be implying has streaming “settled”/“Finished” at that location, but the fact you can pass a query state in (including Unloaded) imply that we should be able to use the function as we’re currently doing.

Can you provide advice on this please?

Cheers,

Chris

// Test if cell is already in the effective wanted state. // Note that GetCellEffectiveWantedState always return Activated when the cell has no data layers. // In this case, continue testing the QueryState with the CellState to respect bExactState. if (!bSkipCell && Cell->HasDataLayers()) { const EDataLayerRuntimeState CellWantedState = Cell->GetCellEffectiveWantedState(StreamingContext); bSkipCell = (CellState == EWorldPartitionRuntimeCellState::Unloaded && CellWantedState == EDataLayerRuntimeState::Unloaded) || (CellState == EWorldPartitionRuntimeCellState::Loaded && CellWantedState == EDataLayerRuntimeState::Loaded) || (CellState == EWorldPartitionRuntimeCellState::Activated && CellWantedState == EDataLayerRuntimeState::Activated); }

Steps to Reproduce
I’ve attached an example project.

Working as expected:

  • Load up the default Map (StreamingProblemTestMap).
  • Hit Play
  • Sphere will be Red when it’s cell is unloaded
  • Run towards Sphere
  • Sphere turns Green when the cell is Loaded

To Reproduce the problem:

  • Load up the default Map (StreamingProblemTestMap)
  • Delete Cube called DeleteThisCube
  • Hit Play
  • Sphere will alternate between Red and Green
    • This is because UWorldPartitionSubsystem::IsStreamingCompleted is returning true for both Unloaded and Active

[Image Removed]

Hi,

Thank you for the detailed report and repro.

I created a bug report for this issue that can be tracked here if/when it’s approved for public visibility: Unreal Engine Issues and Bug Tracker (UE\-306965\). There is no ETA as priorities for bugs and features can shift at any time.

In the meantime, I’ve found this thread that discusses World Partition Streaming Query Source work with Data Layers at https://forums.unrealengine.com/t/does\-world\-partition\-streaming\-query\-source\-work\-with\-data\-layers/2229538\.

Regards