25 auto Instantiator = NewObject<UInstancedStaticMeshComponent>(
this);
26 check(Instantiator !=
nullptr);
27 Instantiator->SetMobility(EComponentMobility::Static);
28 Instantiator->SetupAttachment(RootComponent);
29 Instantiator->SetStaticMesh(Mesh);
30 Instantiator->RegisterComponent();