Attached actors do not return to LevelInstance space at the end of LevelInstance editing, and bounds contains level instance offset location. This results in huge bounds.
My workaround is:
void FLevelUtils::ApplyEditorTransform(const ULevelStreaming* StreamingLevel, bool bDoPostEditMove, AActor* Actor) { check(StreamingLevel); if (ULevel* LoadedLevel = StreamingLevel->GetLoadedLevel()) { FApplyLevelTransformParams TransformParams(LoadedLevel, StreamingLevel->LevelTransform); #if 1 //workaround // Move parent actor instead of child actor USceneComponent* RootComponent = Actor->GetRootComponent(); if (RootComponent && RootComponent->GetAttachParent()) { while( RootComponent->GetAttachParent() ) { RootComponent = RootComponent->GetAttachParent(); } Actor = RootComponent->GetOwner(); } #endif TransformParams.Actor = Actor; TransformParams.bDoPostEditMove = bDoPostEditMove; ApplyLevelTransform(TransformParams); } } void FLevelUtils::RemoveEditorTransform(const ULevelStreaming* StreamingLevel, bool bDoPostEditMove, AActor* Actor) { check(StreamingLevel); if (ULevel* LoadedLevel = StreamingLevel->GetLoadedLevel()) { const FTransform InverseTransform = StreamingLevel->LevelTransform.Inverse(); FApplyLevelTransformParams TransformParams(LoadedLevel, InverseTransform); #if 1 //workaround USceneComponent* RootComponent = Actor->GetRootComponent(); if (RootComponent && RootComponent->GetAttachParent()) { while( RootComponent->GetAttachParent() ) { RootComponent = RootComponent->GetAttachParent(); } Actor = RootComponent->GetOwner(); } #endif TransformParams.Actor = Actor; TransformParams.bDoPostEditMove = bDoPostEditMove; ApplyLevelTransform(TransformParams); } }
[Link Removed]is the repro project.
The actor cluster promoted to a higher grid level than expected, significantly increasing stream out distance.
You can also see promoted actors in StremingGeneration log (Saved\WorldPartition*.log)
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
I can't open my map from the editor.
What method is used to fill polygonal regions when drawing spline mesh at run time?
Teleporter in the Creative Hub is Locked and cannot be accessed
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-187098 in the post.
2 |
Component | UE - World Creation - Worldbuilding Tools - Level Instances |
---|---|
Affects Versions | 5.1, 5.2 |
Target Fix | 5.4 |
Fix Commit | 26094801 |
---|---|
Main Commit | 26095012 |
Created | May 26, 2023 |
---|---|
Resolved | Jun 19, 2023 |
Updated | Jun 22, 2023 |