I am try to implement my own variant of landscape.
At this moment i try to draw grid 64x64 of meshes.
I can’t use DrawStaticElements - because sometimes my landscape changed.
I can’t use DrawDynamicElements - because its depricated.
But in GetDynamicElements i must add my mesh to collector via AddMesh.
And AddMesh method make many operations. In situation with 4096 calls - it is very slow.
How can i avoid calling AddMesh in each frame?
Is it possible to AddMesh only when data changed?
At this moment i found “solution”:
Use DrawStaticElements, and when i need to update geometry - call SetActorLocation(FVector(rand() % 10, 0, 0)) for invalidate.
Its working. But idea not looking as good code.
Is it possible to invalidate static geometry without fake moving?
If you want invalidate geometry - call MarkRenderStateDirty() in component