Breaking up BP Actor into standalone actors/components - almost working, need help

I have a BP actor, a house, that is made up of static mesh components. I need to break it up into standalone static mesh actors, each with corresponding component from the BP actor I am breaking up. Basically I need to end up with the same house standing on the level, but instead of being one BP actor, it needs to be made of many static meshes (however many components original BP actor has).

I couldn’t find a way to make it happen out of the box, so I made a BP code in the graph inside of that BP Actor (not in Construction script). It’s working, but not really:

What happens is I end up with what I want, as seen in the video. However, static mesh components inside static mesh actors are empty. So when I save the level and reload it, I have a bunch of empty static mesh actors and no house.

How do I make static mesh components to actually have static meshes assigned, so that when I reload level - everything is in place as it appears to be in the video ? Thanks

1 Like

Hmm… Found something here Can't spawn static mesh from blueprint
Sounds like static mesh actor cannot be created in the Editor from BP :frowning:

What are you trying to achieve?
You want to split the House actor (composed by a bunch of static mesh components), but you want to do that on gameplay, right?

You need each part of the house to be an independent actor?

you actually can spawn actors in the scene and you can ADD static mesh components to actors…

you can make a HOUSE_PART_BP actor with a single empty static mesh inside and from the house BP you can get all your static mesh components (root–>get all childs?) and then a for loop and for each static mesh you spawn a housePartBP actor and copy the mesh of the static mesh component of the loop into the static mesh component of the spawned actor… you follow me?

1 Like

The code you have there works ( well the concept does ), because I have tools that work exactly like this.

Basically ‘get all components’ into a loop and re-spawn them all at the same transforms, then destroy the BP.

1 Like

Here’s my code

Of course, you have to save the level then…

2 Likes

No no, I need to do it in the Editor. Nothing needs to be done in runtime.

Yep

That’s what my BP code does. Except somehow when I select resulting static mesh actors, they have no mesh assegned. I know it sounds bizarre, but while I can see mesh in the viewport, it’s None in the Details panel. So after I save/reload level, there is nothing showing on the level.

I … literally posted my BP code that works, and yet somehow I end up with empty mesh component (at least in the Detail panel). So this is what I need to fix.

I see what you did there… For Set Static Mesh node, I use actor itself as a target and not actor’s static mesh component :man_facepalming: I will check this out after I get off work, thanks.

1 Like

ok…I did this video thinking you needed it at runtime

if you want it in the editor, then the way is with editor utility blueprints.

let me try some and I share with you…

edit:

in the video I split pressing S key (added in main level blueprint)

I just looked at your video and it’s not quite what I need. You end up with a bunch of standalone BP actors, each containing one mesh of that BP-house.

I need to end up with Static Mesh Actors, as if you dragged them from Content Browser and dropped them into the level. On the level, they won’t be BP actors, they would be Static Mesh Actors.

I’d appreciate seeing Editor Utility blueprint. I’ve never made one and I can’t seem to find any comprehensive training materials about using it :frowning:

ok! here is your solution:

make the function usable in Editor :slight_smile:

1 Like

much appreciated @ClockworkOcean and @eldany.uy , I will tweak my code and let you know how it went :sweat_smile:

2 Likes

Yep, the little fix worked:

1 Like

:sunglasses: :+1:

1 Like

Great!

Hi,
I met the same problem in my project. Would you share your BP codes with me?
Many thanks.

You can just scroll up and read entire thread - all the information to make it happen available.

I’m new to Unreal Engine. I will be very grateful to you if you can tell me how you got the Set Myloop Component and Set NewActor Component nodes?
I watched the video and tried to make a similar function myself, but I don’t understand how to call these nodes.

Has anyone tried this https://www.unrealengine.com/marketplace/en-US/product/1779a50a4a144f05ba4bf26a55c72617 ?

Hi, I haven’t tried that, but rdBPtools does exactly that - converting to StaticMesh Actors:

https://www.unrealengine.com/marketplace/en-US/product/rdbptools

1 Like

What if composite BP actor is made up of various types of actors and not just static meshes? Will rdBPtools decompose it into respective actors?