Not all actor in the blueprint class respond to input

Hello, I’m starting in UE4 and I am experiencing an issue when I created an actor contains a cube, and spawn 2 of them in scene. Then I set up some nodes to set the material when E is pressed, but when I pressed it only one of them changes material!

I have tried to change the auto receive input of the actor, use Enable Input and Set Input Mode Game Only node when Beginplay. But none of them work.

So how could I change the material of all the actors belongs to the class at the same time when receive a input?


It’s working, thanks!

Have you tried something like this:

Create a custom event inside your cube blueprint that will change the color (you have this already in 1st sceenshot). You can now use Get All Actors of Class (select cube blueprint) run for Each Loop and of array element drag out and call your change material event.