When [SerializeWhen] evaluates to false, it does not serialize/deserialize the value yet the MemberSerialized/MemberDeserialized events still get called for the members that have a falsified [SerializeWhen]. This is undefined behavior.
Reproducible example:
bintest1
When
[SerializeWhen]
evaluates to false, it does not serialize/deserialize the value yet theMemberSerialized
/MemberDeserialized
events still get called for the members that have a falsified[SerializeWhen]
. This is undefined behavior. Reproducible example: bintest1