Description

This is a unique problem with macro libraries and the AddComponent node. It would appear that the issue has to do with the MakeNewComponentTemplateName function that we use when we create these functions.

Essentially, the macro library version creates its own unique component template. The AddComponent then references this template by name. However, when we expand the macro, the AddComponent that came from the macro library retains its original template name. This template may or may not exist on the Blueprint generated class of the actor. If it does exist, it's using whatever template already exists on the class, which is likely different than what the macro version is using.

We'll probably have to modify macro expansion to handle this special case for AddComponent.

Steps to Reproduce
  1. Open attached project in the editor.
  2. Double click the MyTestActor instance in the outliner.
  3. Observe that it's using a sphere mesh.
  4. Expected behavior: the mesh should be a floor mesh.

Recompiling the MyTestActor class doesn't fix the problem even though the referenced macro uses a a floor mesh.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-184267 in the post.

0
Login to Vote

Backlogged
CreatedApr 25, 2023
UpdatedJan 18, 2024