[Bug] Instanced Static Mesh Component is broken in 4.17.1
At least RemoveInstance function is buggy, but it looks like an internal problem with indices, so other functionality may be affected as well.
Problem: when you RemoveInstance at some index, other mesh instances disappear as well. If you continue deleting mesh instances one at a time, mesh instances will (seemingly) chaotically reappear and disappear again.
1) Download attached test project;
2) Open, start the game and press F (should delete mesh instance at 0 index);
3) Both 0th and 4th mesh instances disappear;
4) Keep pressing F to observe chaos.
Notes: mesh instances are added in object's constructions script. F key is bound in level blueprint.
asked Sep 08 '17 at 10:42 PM in Blueprint Scripting
I'm also facing big issues with ISM since 4.17, very similar to what Flashback describes. I'm now working on UE 4.17.2, and trying potential new fixes when I see one popping. So today I integrated your commit 3664690 related to the issue UE-49757 hoping it will solve my problems, but it didn't. Before it was chaos, like Flashback explained, but now it's still chaos, plus it asserts here: - Function: void FStaticMeshInstanceBuffer::UpdateInstanceData(UInstancedStaticMeshComponent* InComponent, const TArray >& InHitProxies, int32 UpdateInstanceStartingIndex, int32 UpdateInstanceIndexCount) - Assert: check(DestInstanceIndex != INDEX_NONE);
To the others who have issues with ISM: Could you try integrating this commit to see if it fixes your issues?
I'm using ISM components created at runtime like this (btw, see comment at the last line):
And then, in the Tick of my actor, I'm calling a lot of AddInstance and RemoveInstance on them within the same frame (order and number of times of these calls vary). Apparently, everything is fine when only AddInstance are called, But when both RemoveInstance and AddInstance are called, it asserts.
The repro is simple:
Please give it a try.
Follow this question
Once you sign in you will be able to subscribe for any updates here