ipacketserializationservice
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ipacketserializationservice [2026/08/15 07:16] – created diviner | ipacketserializationservice [2026/08/15 07:23] (current) – diviner | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== IPacketSerializationService ===== | ===== IPacketSerializationService ===== | ||
| - | This service is responsible for serializing [[IEntity|Entities]] into [[EntityPacket|EntityPackets]] and applying EntityPacket data back onto existing Entities. Component state is serialized through the packet serialization strategy associated with each supported [[IComponent|Component]] type. | + | This service is responsible for serializing [[IEntity|Entities]] into [[EntityPacket|EntityPackets]] and applying EntityPacket data back onto existing Entities. Component state is serialized through the packet serialization strategy associated with each supported [[IComponent|Component]] type. Only Components that have a registered [[IPacketSerializationStrategy|serialization strategy]] are serialized; Components without a corresponding strategy are ignored and do not contribute data to the EntityPacket. |
| Component packets may be serialized using either encoded packet identifiers or packet type names. Encoded packets reduce serialized size by replacing type names with numeric identifiers, | Component packets may be serialized using either encoded packet identifiers or packet type names. Encoded packets reduce serialized size by replacing type names with numeric identifiers, | ||
| === Methods === | === Methods === | ||
| - | ^Method | [[EntityPacket]] SerializeEntityPacket([[IEntity]] entity, bool encodeComponentPackets, | + | ^Method | [[EntityPacket]] |
| - | ^Description | Serializes specified [[IEntity]] into an [[EntityPacket]]. If componentTypes are supplied, only supported Components matching those Types are serialized. If no component Types are supplied, all Components on the Entity | + | ^Description | Serializes specified [[IEntity]] into an [[EntityPacket]]. If componentTypes are supplied, only supported Components matching those Types are considered for serialization. If no component Types are supplied, all Components on the Entity |
| - | ^Method | bool DeserializeEntityPacket([[EntityPacket]] entityPacket, | + | ^Method | bool **DeserializeEntityPacket**([[EntityPacket]] entityPacket, |
| ^Description | Deserializes the Component packets contained in specified [[EntityPacket]] onto specified [[IEntity]]. The containsEncodedPackets value must match the encoding mode used when the packet was serialized. Component packets whose packet type cannot be resolved or whose corresponding Component does not exist on the Entity are ignored. Returns false if a Component serialization strategy fails to deserialize its packet; otherwise returns true. An EntityPacket containing no Component packets is considered successfully deserialized. | | ^Description | Deserializes the Component packets contained in specified [[EntityPacket]] onto specified [[IEntity]]. The containsEncodedPackets value must match the encoding mode used when the packet was serialized. Component packets whose packet type cannot be resolved or whose corresponding Component does not exist on the Entity are ignored. Returns false if a Component serialization strategy fails to deserialize its packet; otherwise returns true. An EntityPacket containing no Component packets is considered successfully deserialized. | | ||
| + | |||
ipacketserializationservice.1786778162.txt.gz · Last modified: by diviner
