ecstra icon indicating copy to clipboard operation
ecstra copied to clipboard

Archetype component order matters

Open delaneyj opened this issue 4 years ago • 4 comments

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

delaneyj avatar Mar 23 '21 06:03 delaneyj

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?

DavidPeicho avatar Mar 23 '21 10:03 DavidPeicho

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.

delaneyj avatar Mar 23 '21 15:03 delaneyj

Thanks for the issue then, I will have a look

DavidPeicho avatar Mar 25 '21 09:03 DavidPeicho

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.

DavidPeicho avatar Mar 27 '21 10:03 DavidPeicho