Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComponentSource only support 128 components because ArchetypeWriter use u128 to store claimed. #263

Open
lazytiger opened this issue May 19, 2021 · 2 comments

Comments

@lazytiger
Copy link

lazytiger commented May 19, 2021

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?

@lazytiger
Copy link
Author

The problem is components actually stored in storage, but the claimed counter is overflowed, so the assertion failed.

@selbyk
Copy link

selbyk commented Mar 15, 2022

Are you talking about u128 and usize?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants