I have a UInstancedStaticMeshComponent “Swarm” and I want to move one of its instances.
The code below crashs at the last line.
The Error Message is:
Assertion failed: IsValid() [File:D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Public\Templates/SharedPointer.h] [Line: 890]
Swarm->PerInstanceSMData[SwarmInstance[i]].Transform = FTransform(NewInstanceRotation, NewInstanceLocation).ToMatrixWithScale(); Swarm->ReleasePerInstanceRenderData(); Swarm->MarkRenderStateDirty(); //this line causes the crash
Has Someone an idea what i am doing wrong?