I have a simple level with some cubes (static mesh) that has Tag: “CUBE”. So in Level Blueprint how would I iterate through all the static meshes in my level and find meshes only with the specified tag? In UnrealScript we could use the “for each” expression but seems like this is missing in BP. Or is there any new way of doing this in BP?
Your best bet is to create an array and put your static meshes in there rather than iterating over all the meshes in the entire map. You can do a ForEach similar to this ForGet, cool.
Thanks Daniel. ForGet is a very nice solution. But if i have lot of static meshes in my scene, adding them one by one as array is time consuming. So i request for a dedicated For Each node.
Till then i’ll be using ForGet :). Once again, Thank you Daniel!
Yeah I assumed there was some kind of reasoning behind it, can you select multiple actors and add a tag to them? In all honesty there should be a way to have that selection transformed into an array easily.
P.S How many meshes we talking about anyway?
Am making a city level so there will be couple of building and other usual stuffs.
Just FYI, the next beta will have a ‘Get All Actors Of Class’ node. And we want to provide a ‘for each member of array’ node as a standard feature in the future!
Thanks James. Good to hear that!