Unreal Engine 4.17 Preview

In 4.17 there was some modifications for InstancedStaticMeshComponent. This did break our custom dynamic foliage spawner. It seems to impossible to now initialize batch of data to gpu.
In 4.16 I could just simply do it like this. Which worked like charm. But in 4.17 this causes crash.



instanced->ReleasePerInstanceRenderData();
instanced->MarkRenderStateDirty();


So I figured new way to do this but the function that need to be called is in InstancedStaticMesh.h which is in private folder and I can’t include it.



instanced->PerInstanceRenderData->UpdateInstanceData(instanced, 0, num, false);


Compile error and simplified example is here: