Cast to component of an actor

Hi!

Really stuck with this;
I would need to to cast to a non-scene component of a static mesh actor (that would then change the material listed under the component). I have managed to get the 2nd part working but the issues is in being able to cast anything to the component of the actor in the first place. I have tried several different methods but the cast always fails. With actors, I have managed to solve this sort of thing with ‘get all actors of class’ but I can’t use any ‘gets’ with components.

Help is surely appreciated!

Cast to the actor and then just “Get” the component you need by its name.

1 Like

This pretty much all you need: Once you have a reference to the actor with the component you want use “Get Component by Class”

It’s already correctly cast-typed so if the actor has the component it’ll just work.

262467-captura.png

2 Likes