We are creating a very large map and need a large count of foliage instances, like way over 32767 which is the positive range of an int16.
Somehow the editor is able to do those manipulations, but when its done from blueprints, its not possible to remove instance at limit+1
If you add 40k instances of the same foliage type using the paint on landscape tool or another way, then you can’t access the foliage instances past the positive limit of int16.
To reproduce, use the procedural foliage tool with a single type of foliage, then add more than 2^15 instanced meshes and try to remove the last instance.
To fix the issue, we are changing the type of InstanceBodyIndex to int32 in our engine source.
All variables being assigned InstanceBodyIndex value seem to be of type int32