Child actor component templates, when nativized, end up being owned by the converted Blueprint class object, rather than the child actor component template. Furthermore, we don't regenerate the child actor template when the child actor component is renamed in the Blueprint editor, so if the class is set while the component is still set to the default "ChildActor" name, the resulting child actor template object will use that name as a prefix, and it won't change even if the component is later renamed.
If another child actor component is then added and the child actor class is set to the same class type as the first, the child actor template will end up with the same name as the first. However, each child actor template is owned by each individual child actor component template, so this doesn't cause any issues in either the editor or the cooked build when nativization is disabled (as it is by default).
However, when the Blueprint class is nativized, the code that's generated to instance the child actor template objects does so with the converted Blueprint class as its Outer in both cases. As a result, after the first child actor template is instanced and initialized, the second child actor template is subsequently instanced using the same object name. This replaces the first instance and any child actor template data customizations are effectively lost at runtime as a result.
Current suggested workaround:
In the Blueprint editor, you can force the template to be recreated with the correct name by changing the child actor class away and then back in the Details panel. However, note that any specific property value overrides you've changed away from the default value on the template may get lost in the switch, so you might have to keep track of and reset those as well.
N/A
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-87553 in the post.
4 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.22, 4.23, 4.24 |
Created | Jan 27, 2020 |
---|---|
Resolved | Jul 15, 2021 |
Updated | Jul 19, 2021 |