legion
legion copied to clipboard
ComponentSource only support 128 components because ArchetypeWriter use u128 to store claimed.
pub struct ArchetypeWriter<'a> {
arch_index: ArchetypeIndex,
archetype: &'a mut Archetype,
components: MultiMut<'a>,
claimed: u128,
initial_count: usize,
}
ArchetypeWriter only counts at most 128 components, but this limit does not exist if using entry.add_component. Could clamied be extended to a slice or something else?
The problem is components actually stored in storage, but the claimed counter is overflowed, so the assertion failed.