I found out that implementation of Remove function has a bug that makes it delete multiple items (exactly index + 1) not single one.
public bool Remove(in T item)
{
int index = IndexOf(item);
if(index < 0)
return false;
RemoveRange(index, index+1);
return true;
}
There should be simple RemoveRange(index, 1); since RemoveRange accepts number of items to remove as second argument, not end of range.
I could not find any way to report it directly to Unity.Collections team, I hope this is not so wrong place to do so.
It can be observed in sources of newest com.unity.collections@0.5.0-preview.9.
For reference, description from docs:
Searches for the specified int from the begining of the FixedListInt128 forward, removes it if possible, and returns true if the int was successfully removed.