I have a system that is spawning 10+ actors (objects) into the scene every 5 or so minutes, and I have an overlay material that highlights them for 10 seconds when you hit a button. I need to be able to reference the actors that are spawning in order to change the materials, but I don’t want to do it only when they are overlapping the actor (begin overlap) and I’m unsure how to reference the actor otherwise. If I use get all actors of class it only changes the material for one of the actors so I’m a little at a loss?
Here’s where I’m changing the material (inside actor with a custom event)
Get all actors of class should work and it is the most straight forward way. Can you show your “get all actors of class” solution that doesn’t work? What you did on the screenshot is not the way to go. Anyway anything else is just an optimization on the “get all actors…” that will still produce an array you have to loop through. (Like to register all actors on spawn)