Hello, beginning in 5.7.0-preview-1 and continuing through 5.7.1, I saw ensure(EditorHash) failing in UWorldPartition::GetEditorWorldBounds(). I determined the cause. FEditorViewportClient invalidates CachedWorldBounds in OnMapLoad(). FEditorViewportClient::Tick() checks if the bounds are invalid and, if so, gets them from GetWorld()->GetWorldPartition()->GetEditorWorldBounds(). Normally GetWorld() returns the editor world and this works fine. But if PIE begins before the next FEditorViewportClient::Tick(), then GetWorld() returns the PIE world, and the ensure fails because it has no EditorHash. We worked around this by manually calling FEditorViewportClient::Tick() right after FEditorFileUtils::LoadMap() returns, and just wanted to report the issue.
Best,
Max
[Attachment Removed]
Steps to Reproduce
In an automation test (IMPLEMENT_COMPLEX_AUTOMATION_TEST) RunTest(), call FEditorFileUtils::LoadMap() to load a map that uses world partition, then ADD_LATENT_AUTOMATION_COMMAND(FStartPIECommand(true)). Run the test in the editor.
[Attachment Removed]
Hi there,
Thanks for providing the information and repo steps.
After some testing, I have found that the issue has been fixed upstream in the ue5-main branch by checking if the world is the game world. So the EditorViewportClient would not reset the CachedWorldBounds for non-editor worlds.
The link to the commit that fixes this issue is here:
https://github.com/EpicGames/UnrealEngine/commit/34c8c1ce193de200c42461e07aea86059c8357b7
Let me know if you have any further questions or need assistance in porting the fix.
Thanks,
Henry
[Attachment Removed]