Adding A Static Mesh to a Pawn

Hey everyone,

My problem is outlined here https://answers.unrealengine.com/questions/129584/details-panel-missing-for-static-mesh-component-in.html . I’d like to add a static mesh to an actor but I’m obviously doing something wrong because it isn’t working. What I’m doing is I have a class that inherits from APawn. This class has a TSubobjectPtr of type UStaticMeshComponent which is initialized inside of the constructor but the asset reference is set via blueprint (or rather…I would like to set the asset reference via blueprint but it wasn’t working).

Any ideas?

VisibleAnywhere should work, but


ShipMesh->AttachParent = CapsuleComponent;

looks odd since AttachParent says “what we are currently attached to”. You probably wanted to attach the ShipMesh to the Capsule?


ShipMesh->AttachTo(CapsuleComponent);

Ok looking at your pic it seems the attachment per se worked with AttachParent, so I’m not sure.