Hello Unity Team,
The default serialization logic currently resend the entire buffer when the element count changes, as it’s challenging to determine precisely what has changed. However, in our scenario, we utilize a custom IElementDataHashMapBuffer where everything is stored as key-value pairs.
What are the available approaches for developing a customized serialization logic for our specific IElementDataBuffer?
Thanks !
Not many that are easy to do.
Buffer serialisation logic is largely opinionated at the moment, and somewhat all code-generated, and this is where we are actually encoding how the buffer need to be serialized/deserialized.
Because in general we couldn’t know the content of the buffer and if the size is changed, we don’t do any delta compression.
To change that logic it is required to make changes in the template and some places in the package too (ghost receive system in paricular).
While plenty doable, it is not definitively the easiest thing to change.
We are planning to add more options for that and to let specify that behaviour a little bit more (i.e: element are still delta compressed) but in order to customise many of the serialisation aspect we need to refactor the seriallzatoin support to let user customise the behaviour as they want.
1 Like
I prefer to stick to no custom serialization until an official way to do this is released.
Thanks !
Hey @CMarastoni
Anything new about this ?