hello,
I’m attempting to create dynamically components for my actor from the construction script, the components seem to spawn in the viewport but don’t appear on the component list nor I can edit them, is there a way to make this work?
the code is :
for(int i = 0; numeroFlechas > i; i++){
UArrowComponent* flecha = NewObject<UArrowComponent>(this,TEXT("Flecha" + i));
flecha->SetRelativeLocation(FVector(50*i, 0.f, 0.f));
flecha->SetRelativeRotation(FRotator(0.f, 0.f, 0.f));
flecha->RegisterComponent();
flecha->ReregisterComponent();
RootComponent->AttachToComponent(flecha,FAttachmentTransformRules::KeepRelativeTransform);
UE_LOG(LogTemp, Warning, TEXT("Flecha %d creada"), i);
}
I share aswel a picture of the bpm where you can see only one arrowComponent being created (the root) and the other arrows showing from the other end, as to proof they are being constructed but not registered