x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

ChildActorComponent: Child Actor blueprint becomes dirty when RootComponent is set in C++

Hi,

I have an Actor (lets call it BadActor) that is defined in C++ where i initialize its RootComponent in the constructor using:

 SetRootComponent(CreateDefaultSubobject<USceneComponent>(TEXT("DefaultRootComponent")));

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:

 #define ENABLE_QUICKFIX 1

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.

Product Version: UE 4.15
Tags:
more ▼

asked Mar 31 '17 at 02:09 AM in Bug Reports

avatar image

hamouras
1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey hamouras-

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.

Cheers

Doug Wilson

more ▼

answered Mar 31 '17 at 02:41 PM

avatar image Dan Spitzley Sep 20 '17 at 07:11 PM

Hello,

We've run into the same problem. We're on 4.16.2, but it's been an issue for a while. Based on the bug report link, this should be fixed now, but looking in the licensee P4 depot it appears the fix was overwritten accidentally (I presume). The original fix was in changelist 3372764. Another change in that same chunk of code was submitted with changelist 3431439, but the original fix seemed to be intact. However, with changelist 3439045 Dev-Main was merged into Dev-Framework, erasing the fix from 3372764.

Thanks, Dan Spitzley Obsidian Entertainment

avatar image Doug E ♦♦ STAFF Sep 21 '17 at 01:56 PM

Hey Dan-

The report that I entered was a duplicate of an already existing issue (https://issues.unrealengine.com/issue/UE-43328) that's targeted for a 4.18 fix.

avatar image Dan Spitzley Sep 21 '17 at 05:15 PM

Hi Doug,

I talked with Marc Audy on the UDN and he confirmed that the change was backed out in favor of another one (CL#3603249) that didn't affect some systems that rely on the original behavior. It's a very simple fix, so I'll just integrate that one.

Thanks, Dan

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question