The end parameter of InsertRangeWithBeginEnd isn’t clear enough for me to feel like I understand what it’s doing. The docs say the end parameter is, “The zero-based index just after where the elements should be removed.”
The phrase “elements should be removed” is not 100% clear to me.
Can anyone help clarify what this function is doing?
Why don’t the Unity devs wrap this into a higher-level function that just does Insert and InsertRange?
Well, I’ll be … no idea; I’ll blame Google. I’ve done that so many times by now I should know to try that. Though many times I have and the newer docs are the same as the old docs.
It seems like a nice method to have, but I am still thinking we should have the simpler Insert and InsertRange counterparts.
In my case, I think I’ll probably just build a new list rather than modify the existing one. It’s more memory but should be faster in this case. Thinking about it, if I change this job from IJob to IJobParallelFor and use AsParallelWriter() it should be better. But I may try both if performance becomes a sticky spot here.