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

Serve should destroy Entity<T> #4855

Open
metalgearsloth opened this issue Jan 23, 2024 · 2 comments · May be fixed by #5578
Open

Serve should destroy Entity<T> #4855

metalgearsloth opened this issue Jan 23, 2024 · 2 comments · May be fixed by #5578

Comments

@metalgearsloth
Copy link
Contributor

It can be added as a datafield and people have started doing it but this is going to break serialization hard afaik, it'll just be a timebomb whenever someone decides to fix persistence.

@deltanedas
Copy link
Contributor

again easy way is serialize as just EntityUid then TryComp and use a detailed error message (if non optional) when reading it

@ElectroJr
Copy link
Member

ElectroJr commented Dec 27, 2024

again easy way is serialize as just EntityUid then TryComp and use a detailed error message (if non optional) when reading it

Its not that easy, because data / components are loaded onto entities sequentially. So you might be parsing an entity & its data-fields before the entity being referenced has been loaded, so you don't know yet whether or not it has the component.

I'm sure it can be supported eventually, but would take a bit of work and for now it just isn't and at the very least should generate errors

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

Successfully merging a pull request may close this issue.

3 participants