Editor scripting utilities - Actor Action Utility - casting problem

Hi, I try to make a simple function for multiple material change in scene with Editor scripting Utility, but I get to trouble to cast static mesh hiden in blueprint/actor (viz images). I alredy try diferent ways how to cast, but nothing works to me.

Static mesh is in hiearchy Actor->SceneComponent->Static Mesh Component (model made by client and imported into unreal). When I try similar code in diferent project, where static mesh want part of blueprint/actor, worked nicelly.

Im using latest version of UE5 (5.0.1)

Can you please help me? Thanks

Second picture with function

Sounds like your actor is not a StaticMeshActor.
Use the GetComponent function (Get Component by Class | Unreal Engine Documentation) directly on the actor from your array.

Thanks for reply. I try it with StaticMeshComponent class (and hierarchical Instanced and instanced static mesh component) viz uploaded image, and still doesn’t work. I propably still missing something