/** HEADER */
private:
/** set the static mesh of actor */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Static Mesh", meta = (AllowPrivateAccess = "true"))
class UStaticMeshComponent* MeshComponent;
// CPP FILE
// need to include in cpp file
#include "Components/StaticMeshComponent.h"
MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
RootComponent->SetupAttachment(MeshComponent());