Why Static Mesh ACtor?

Hi I want to know why you use static mesh actor class?I read this article [https://docs.unrealengine.com/en-us/Engine/Actors/StaticMeshActor]
but it is not obvious why you use static mesh actor instead of actor
thanks a lot

1 Like

I’m assuming your talking about the platform. The point was to have a static mesh in the level to be able to replicate it and see where the code is running. There’s surely multiple way of doing this. We could have used an actor, but an actor doesn’t have any physical representation in the world, that means no mesh Documentation. But that can be fixed by add a StaticMeshComponent to it (Documentation. So An Actor + StaticMeshComponent = StaticMeshActor. It’s merely a shortcut. As you can see in the AStaticMeshActor documentation it has a method GetStaticMeshComponent() that can be called to get the underlying StaticMeshComponent. Also, in the documentation, you can see that the StaticMeshActor inherit from the Actor class.

To summarize it, an Actor doesn’t have a visual representation in the world and we wanted to see where the code was running by putting something visible in the world. Last important thing, when you drag a mesh in the world, it automatically create a StaticMeshActor, as said in the documentation you linked.

Hope it helped you, don’t hesitate if you have more question!

3 Likes

Thank you it is full and complete

Privacy & Terms