I must be missing something very basic but I can’t figure it out and I could use some help. What I am trying to accomplish is to have a Pawn with a TArray of actors as component, and every time I press a key a new component is spawned and drawn on screen.
As the actor’s mesh I am using a UProceduralMesh (a simple cube), and in the SpawnerPawn class the actor is created like this:
AChairActor* _actToSpawn = NewObject<AChairActor>(**this**, TEXT("CHAIR")); _actToSpawn->SetActorLocation(FVector(0.0f, 0.0f, 0.0f)); _chairs.Add(_actToSpawn);
The function which draws the AChairActor procedural mesh is called in the AChairActor construction. I have tried to print the number of elements in the _chairs array and verified that it is as expected, but still I can’t visualize the mesh. I have been looking online but I did not find any indication telling me if this is the correct way to go.
Thank you in advance for your help