ChildActorComponent: Child Actor blueprint becomes dirty when RootComponent is set in C++
I have an Actor (lets call it BadActor) that is defined in C++ where i initialize its RootComponent in the constructor using:
and then derive this Actor in a new blueprint class (called BadActorBP).
In a separate blueprint Actor (TestContainer) I use the BadActorBP in a ChildActorComponent. Every time i open, or compile TestContainer, or modify any of its properties the BadActorBP becomes dirty.
If i don't create a default root component in C++ the problem doesn't occur.
I have attached a test case project that demonstrates the problem. By opening the TestContainer.usasset the BadActorBP.uasset becomes dirty as i mentioned. Any modification of the TestContainer (even unrelated to the ChildActorComponent that instantiates the BadActorBP) will also cause the file to become dirty.
I found a quick fix for the issue so that i can continue development on my project. You can check the fix by setting in BadActor.h:
In effect what this does is not to create a default root component but instead create one either during OnConstruction or in BeginPlay. Obviously this is not ideal since you can't serialize the root component but as a temporary solution its fine in my case.
asked Mar 31 '17 at 02:09 AM in Bug Reports
Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here https://issues.unrealengine.com/issue/UE-43517 . You can track the report's status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.
answered Mar 31 '17 at 02:41 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here