Change public variables of child actor component

I am building a house as a single actor with all walls, floors, windows and doors as static mesh / child actor components. So I can easily move the house in the level or use multiple instances of it. This works fine with static mesh components but I am quite nonsatisfied with the child actor component.

One thing I am having problems with is that I am trying to change public variables in the house actors construction script. Sadly this isn’t working in the details panel of the child actor component. So for example I am trying to change the mesh of the child actor. This looks like the following:

93060-constructionscript_actor.png

The construction script of the child actor contains the following nodes:

93061-constructionscript_childactor.png

Funnily this worked at first, but after I saved and reloaded the project, it doesn’t anymore though I didn’t change anything.

When I place one DoorActor in the level and edit the DoorMeshOverride variable it works fine. So I think the construction script of the actor and the child actor component might be executed in the wrong order.

Can anyone think of an elegant solution to solve this?

One solution I could think of might be to move the part in the child actor components construction script to its BeginPlay event. But there is actually no point to run this each play and this would mean I wouldn’t see the overriden mesh during level design progress.

Another solution would mean to create child actors of the DoorActor with a changed Door mesh. But since this isn’t the only variable I want to change I would need many child actors with each combination of those variables I want to use in all house actors. Obviously this is also a bad solution.

Hello,

I was reading your post and I think I have a video for you.

Zach Parrish uses child actor components in his example along with changing meshes.

I hope this helps

Hello xFredx,

thanks for your response. I just watched the training video you posted. Around minute 32 Zak just used the way I described the in my second solution idea. It sounded for me that Unreal Engine 4 sadly doesn’t support to change the public variables of child actor components in a way I would’ve liked to.