Instanced static mesh component does not add instances transforms to PerInstancePrevTransform array when using UInstancedStaticMeshComponent::AddInstances. Additionally Updating the transforms of the instances also does not add them to the array.
Licensee includes proposed fix in question.
From Lisencee:
Create an actor in c++ with a UStaticMesh property. Insert following code in BeginPlay:
UInstancedStaticMeshComponent *ISM = NewObject<UInstancedStaticMeshComponent>(this);
ISM->SetStaticMesh(MyStaticMesh);
ISM->SetHasPerInstancePrevTransforms(true);
ISM->SetMobility(EComponentMobility::Movable);
ISM->RegisterComponentWithWorld(GetWorld());
TArray<FTransform> Transforms;
Transforms.SetNum(10);
ISM->AddInstances(Transforms, false);
Create blueprint child of c++ actor. Set Static Mesh property, add it to the world and start PIE session.
Debug and observe ISM's PerInstancePrevTransform array is empty. Also test using:
for (FTransform Transform : Transforms)
{ ISM->AddInstance(Transform, false); }To confirm actual expected outcome.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-356699 in the post.
| 0 |
| Component | UE - Graphics Features |
|---|---|
| Affects Versions | 5.6 |
| Created | Dec 3, 2025 |
|---|---|
| Updated | Dec 4, 2025 |