I’m using UE 5.0.3. I tried to set the material of static mesh components with map and set material node.
I use a map because not all static mesh components use the same material. So, I created a map to store the corresponding material for each static mesh. What I want to do is, when the array index of the key and value is matched, set the material to that static mesh component.
However, It said I had an infinite loop.
Is there any way I can achieve what I want to do? Thanks!
The index doesn’t mean anything here, because a map can be accessed in any order, that’s the whole point
If you were going to use a map, you would have something like mesh:material. Then you just run through the keys ( meshes ) and set the materials ( values ).
Thank you for your reply! Is this what you suggested I do? I set the map to be static mesh actor: Material instance. The map is great, with about 500 rows, but there is an infinite loop within the for each loop. Could you please provide extra help? Thanks!