IsEditorOnly is not reflected in grandchild actor when parent/child/grandchild are constructed with ChildActorComponent. This causes the issue that actor will increase incorrect when save the level.
Workaround:
Change the following code in ChildActorComponent.cpp.
void UChildActorComponent::CreateChildActor() { // ... #if 1 // changed start bool isEditorOnly = IsEditorOnly(); if (MyOwner) { isEditorOnly = isEditorOnly || (MyOwner->IsEditorOnly() || MyOwner->HasAllFlags(RF_Transient)); } if(HasAllFlags(RF_Transient) || isEditorOnly) #else // original if (HasAllFlags(RF_Transient) || IsEditorOnly()) #endif // changed end { // If we are either transient or editor only, set our created actor to transient. We can't programatically set editor only on an actor so this is the best option Params.ObjectFlags |= RF_Transient; } // ... }
When see the World Outliner, the Actor (BP_GrandChild) has increased on the level.
How does TextureRenderTarget2D get TArray<uint8> type data?
How to delete some elements correctly when deleting an array loop?
Why does the REMOVE method of map container remove elements have memory leaks?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How do I set a material as a post-processing material?
What does the number (2152,1-34) in glsl error mean?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-85478 in the post.
0 |
Component | UE - Gameplay - Components |
---|---|
Affects Versions | 4.22, 4.23, 4.24 |
Target Fix | 4.26 |
Fix Commit | 14105452 |
---|
Created | Dec 6, 2019 |
---|---|
Resolved | Aug 28, 2020 |
Updated | Apr 28, 2021 |