If a blueprint actor has more than or equal to 5 different HierarchicalInstancedStaticMesh placed in the construction script, and the game is packaged for Windows (64-bit) with at least one of these in the world, then the packaged game is unable to run, returning “Assertion failed: bIsGrass || WriteOncePrebuiltInstanceBuffer.NumInstances() == GetNumRenderInstances()
[File: \Build++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\Engine\Private\HierarchicalInstancedStaticMesh.cpp][Line: 2527]” (Using 4.16.2) once the built version of the game is run.
Steps to reproduce:
Create an actor blueprint
Create 5 different HierarchicalInstancedStaticMesh (I used “shape_Trim_90_Out”, “SM_Lamp_Ceiling”, “SM_TableRound”, “SM_WindowFrame” & “SM_Arrows” from the default content to test)
Make sure that all 5 meshes are placed (since according to my testing it is only when it is above 5 meshes the error occur)
Run a loop placing them (I just used flip-flops to test) in the construction script
i found that for me it cooks and does not crash if cooked for shipping,
but if you cook for development it will crash when trying to load any map contain any hism actors.
Sorry for the delay and I’m glad you found a workaround.
I was able to reproduce this in 4.16, but I was unable to repro it in 4.17 Preview 1. So you should see this working properly once the full 4.17 is available.
4.17 does work now to package, but if you toggle the HLOD actor’s visibility to hidden it won’t toggle back for some reason. It works fine run from the editor, it only breaks in the packaged version.