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

Archetype component order matters #22

Open
delaneyj opened this issue Mar 23, 2021 · 4 comments
Open

Archetype component order matters #22

delaneyj opened this issue Mar 23, 2021 · 4 comments

Comments

@delaneyj
Copy link

Most likely should sort component by constructor name as currently the order component are add probably with effect the hash.

@DavidPeicho
Copy link
Owner

Hi, thanks for the issue.

In what way does it matter to you?
Sorting by constructor name is dangerous because of name mangling when uglyfing code. I could force user to give a name to classes but I find that annoying.

Do you have a use case for that?

@delaneyj
Copy link
Author

All I was saying is the same components add to an archetype in a different order is a different hash code from what I saw and it looked like unintended behavior.

@DavidPeicho
Copy link
Owner

Thanks for the issue then, I will have a look

@DavidPeicho
Copy link
Owner

DavidPeicho commented Mar 27, 2021

Had a look today. Yes I remember why I did that. The hash is indeed dependent on component insertion order. For now I will keep that open but won't fix it. I believe it shouldn't create issues even when I add serialization.

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