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); }