Any further help by someone who has encountered this before would be much appreciated.
I am slowly making progress:
BitVector holds the component count in
EntityManager._componentTypes holds a list of the component types.
This is essentially the same amount of items as
componentTypes is a dictionary where the values are
EntityComponentTypes which have an
int Index property. This property is supposed to correlate with the number of items in
During the first run, there are 27 items in
_componentTypes and the
Index properties of it's
EntityComponentTypes range from 0-26.
On the second run,
_componentTypes.Count still only has 27 items.
Index properties of
EntityComponentTypes were added to which make the values 27-53.
When these values are passed into the
BitVector for a calculation it throws
foreach loops starts by passing 53.)
BitVector._array was set to have indexes of 0-26 (27 items).
Now I just have to figure out why this is happening and how to fix it...hopefully a quick fix is just a matter of clearing some collections before registering components.