Cast to StaticMeshActor failure?

I’m trying to setup an abduction beam similar to the example in unreal’s content example input level, seen here

After I’ve stored all the relevant actors into an array I loop through the array and cast each actor as a static mesh actor so, just like in the example, I can do some physics on it. Problem is, the cast is failing? What are some reasons why this cast would fail? Is there an error output somewhere that I can debug?

Thanks!

Can you post a pic of the code? Could be a number of things like the cast is for StaticMesh and not StaticMeshActor, or the actors in level are actually skeletal or blueprints based on Actor only, or your array is not being populated correctly, etc.

I would put some print strings in there and verify everything coming in is not null and even print out each objects class. Then post a pic or two of your setup.