Hi,
Is there a way to "Add Static Mesh Components" dynamically?
As you can see in the BP, I Have to add a complete new "Add Component"
Block for every "New Mesh" + "New Material" I want to add.
Is there a way to use the Array dynamically with a flexible amount of mesh components?
Thx
Replies
f.e = "Array 0" has "Mesh A" assigned and now I want to get the Materials of "Mesh A". Tried it with Get Material, but I only Get the last Array Mesh.
Thank you Obscura.
Maybe I should explain, what I actually wanted to achieve:
Essentially just a simple "Dynamic Prefab", which attaches arbitrary SMeshes to a socket in the main/root SMesh -> f.e House with door; house with door + window; airplane with door + window....
Regarding the Materials - it would be enough to get the assigned materials/ indices from the Static Meshes, which later on show up in the actor (as editable variable), so I can drag n drop new materials in the slots to the SMeshes in the actor or whatever will work (I tried it with get material, but as I said, only got the last array mesh or nothing worked at all - no link to the SMs in the mesh array).
https://www.google.rs/search?client=opera&q=unreal+engine+prefab&sourceid=opera&ie=UTF-8&oe=UTF-8
With UE4.22, you can have editor widgets. This would make things somewhat easier, and make the aforementioned setup would look and work less hacky.
Thx a lot for your explanation...will check your link.
But I think the time investment will not pay off in this case till I reach that scripting level.
I only tried it this way, because I always get " Static Mesh Actor has NULL StaticMesh property" warnings with a "Set Static Mesh" Array, so I tried it with "Add Static Mesh Component"
But warnings are no errors, so I can live with this issue and it worked so far.