How could I loop around actor to get static meshes?

Hi I have an actor with multiple static mesh components. I want to assign a certain material to some of the components however I’m having trouble.

Ideally what I would like to do is use a command something like:

  1. Get all static meshes
  2. Loop all of them
  3. Does the name of the static mesh = keyword
  4. If it does assign material

I’m stuck on step 1. I can’t find a Get all static meshes.

Anyone got a good solution?

Great thanks Newest

What you looking for is Get Components by Class then just do equal on the static mesh for what you want