In the Below code, I’ve assigned StaticMeshComponent name as “StaticMeshComponentCOMP1, StaticMeshComponentCOMP2”. It is not very efficient for N component.
StaticMeshComponent[i] = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshComponentCOMP1"));
StaticMeshComponent[i] = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshComponentCOMP2"));
So I’ve tried to assign StaticMeshComponentCOMP with auto increment as below, but couldn’t able to achieve the result.
StaticMeshComponent[i] = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshComponentCOMP" + '%i'));
thank you for your help in advance