How do you create and add additional UStaticMeshComponents for rendering outside an Actor’s constructor? My actor will have an arbitrary number of pieces, determined by an int32
exposed to the editor. Doing this in the constructor with PCIP.CreateDefaultSubobject
worked fine, but the variable changing in the editor didn’t do anything.
I now know that I have to have a method called OnConstruction
where the actual “work” is done, but how would I create and attach the correct amount of UStaticMeshComponents here?