namespace Svelto.ECS.Serialization { public interface IEntitySerialization { /// /// Fill the serializationData of the entitiesToSerialize of this descriptor /// /// /// /// /// Size in bytes of the newly instantiated entity void SerializeEntity(EGID egid, ISerializationData serializationData, int serializationType); /// /// Deserialize a serializationData and copy directly onto the appropriate entities /// /// /// /// void DeserializeEntity(ISerializationData serializationData, int serializationType); /// /// Deserialize a serializationData and copy directly onto the appropriate entities with explicit EGID /// /// /// /// /// void DeserializeEntity(EGID egid, ISerializationData serializationData, int serializationType); /// /// Deserialize a serializationData and copy directly to an previously created EntityComponentInitializer /// /// /// /// /// void DeserializeEntityComponents(ISerializationData serializationData, ISerializableEntityDescriptor entityDescriptor, ref EntityComponentInitializer initializer, int serializationType); /// /// Contrary to the other Deserialize methods that assume that the entity exists, this method is used to deserialise /// a new Entity /// /// /// /// /// EntityComponentInitializer DeserializeNewEntity(EGID egid, ISerializationData serializationData, int serializationType); /// /// Special Entity Swap method that works without knowing the EntityDescriptor to swap /// /// /// void DeserializeEntityToSwap(EGID localEgid, EGID toEgid); /// /// Special Entity delete method that works without knowing the EntityDescriptor to delete /// /// void DeserializeEntityToDelete(EGID egid); void RegisterSerializationFactory(IDeserializationFactory deserializationFactory) where T : ISerializableEntityDescriptor, new(); T DeserializeEntityComponent(ISerializationData serializationData, ISerializableEntityDescriptor entityDescriptor, int serializationType) where T : unmanaged, IEntityComponent; } }