I’m using UE4.26.2.
Originally, I had a base Blueprint class that a few different actors derived from. This BP has 3 actor components (a static mesh, widget, and sphere). I’ve now decided to create a base C++ class that this blueprint will inherit from. I’m planning to move all logic from the BP class into this new C++ class. I also want to move these BP actor components into the C++ base class, but I’m running into an issue.
If I remove the components from the BP and add them in C++ (ensuring that the components have the same name), then every child actor that had a custom static mesh set now defaults to null. In C++, I’ve set the property specifiers for these components to be EditAnywhere and BlueprintReadWrite.
For instance, this is what I see when I view one of these actors that had already been placed in a level before my changes:
And this is what I see if I place a new actor into the level:
I don’t see a way around this issue. It looks like my two choices are:
-
Manually copy each child’s static mesh reference to the new C++ component.
-
Keep the blueprint actor components and work around this in C++.
Is there a solution I’m missing?