This pull request introduces a new deserialization mode called STRICT in the bitECS library. The STRICT mode ensures that entities retain their original entity IDs during the deserialization process, even if some entities have been removed.
Changes Made
Added STRICT deserialization mode to the DESERIALIZE_MODE enumeration.
Updated the defineDeserializer function to handle the STRICT mode.
Modified the addEntity function to accept an optional specifiedEid parameter.
Added a new test case to verify the functionality of the STRICT mode in the Serialize.test.ts file.
Testing
The new functionality has been tested and verified with the following test case:
should deserialize properly with STRICT behavior
This test case ensures that the deserialized entities retain their original entity IDs, even if some entities have been removed.
Notes
This contribution aims to enhance the flexibility and reliability of the bitECS library's deserialization process. We look forward to feedback and suggestions from the maintainers and community.
Description
This pull request introduces a new deserialization mode called
STRICT
in the bitECS library. TheSTRICT
mode ensures that entities retain their original entity IDs during the deserialization process, even if some entities have been removed.Changes Made
STRICT
deserialization mode to theDESERIALIZE_MODE
enumeration.defineDeserializer
function to handle theSTRICT
mode.addEntity
function to accept an optionalspecifiedEid
parameter.STRICT
mode in theSerialize.test.ts
file.Testing
The new functionality has been tested and verified with the following test case:
should deserialize properly with STRICT behavior
This test case ensures that the deserialized entities retain their original entity IDs, even if some entities have been removed.
Notes
This contribution aims to enhance the flexibility and reliability of the bitECS library's deserialization process. We look forward to feedback and suggestions from the maintainers and community.