ientitypacketcollectionloadingservice
This is an old revision of the document!
CREAT3D.ECS.Services.ChunkManagement
IEntityPacketCollectionLoadingService
This service's primary responsibility is to load serialized Entities from an EntityPacketCollection into a specified Chunk. Loading is performed through a coroutine so large collections can be processed over multiple frames.
Broadcasts Events: EntityPacketCollectionLoadingStartedTopic, EntityPacketCollectionLoadingProgressTopic, EntityPacketCollectionLoadingCompleteTopic
Methods
| Method | Task LoadEntityPacketCollection(Chunk chunk, EntityPacketCollection entityPacketCollection, bool containsEncodedPackets, CancellationToken cancellationToken) |
|---|---|
| Description | Loads all valid serialized Entities from the supplied EntityPacketCollection into the specified Chunk. Progress is broadcast during loading according to the configured loading frequency. The containsEncodedPackets boolean is used to instruct how the Entity packets deserialize. Packet encoding reduces save file size by storing a packet's type as an integer instead of serializing its Type as a string value, but adding new packets can break the indexing and corrupt the save file. An EntityPacketCollection must deserialize with the same encoding setting it was serialized with. |
ientitypacketcollectionloadingservice.1777137770.txt.gz · Last modified: by diviner
