Make Entity class Serializable? #1220
chengenzhao
started this conversation in
Ideas
Replies: 1 comment
-
Entity is a list of components. A ViewComponent is a required component, backed by a Node, which is not Serializable. Therefore, Entity cannot be Serializable. The currently supported approach is to serialise components via the
I never finished the design of Entity serialisation this way, as there wasn't a ready-to-go demo to support it, but ultimately, it should look like this (pseudo code):
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi:
We are working on save & load service/handlers
and 1 requirement is some people hope to save the instant state of the game world
in order to do that, we hope to save the entities in the game world
but current Entity class doesn't implements Serializable
thus it can not be saved directly
so the questions is: Is it a good idea to make entity class Serializable?
Seems like no harm but I am not sure about the performance etc.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions