How to create array from Static Mesh actors in a blueprint?
I have like alot of actors within this blueprint an many other that i need to change materials to. Previously i would connect each one in the target point however im fed up with it and tried to create an array but with no success. Can someone tell me of a better way to do this?
You can use the method in the first pic, just run the output through For Each loop - this will iterate through every element in the array Get All Actors Of Class spits out. That's for actors.
You manually add them to an array using Make Array node. Create a variable of the desired type and turn it into an array - looping with For Each node will give the iterations. You need to do it only once but you can have more than one array. You can have the same object reference stored in more than one array if needed.
Yet another way is to use tags, Get Components By Tag node returns a filtered array.
If you need something more complex (run-time only, though) use a collider and Get Overlapping Components. -> For Each.
Follow this question
Once you sign in you will be able to subscribe for any updates here