Method RealComponentPayloadsRoundTrip
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
RealComponentPayloadsRoundTrip()
Every payload type a component really writes, through the slot it is handed - the types themselves, not a stand-in.
public static string RealComponentPayloadsRoundTrip()
Returns
Remarks
This is here because of a failure that reached a player. The payload types used to be declared inside
their MonoBehaviours (one of them private), the move to MemoryPack annotated every top-level save type and
missed these, and a type without [MemoryPackable] has no formatter - so the first item carrying one
of these components to be saved threw
[MemoryPackSerializationException] GrindFest.LiquidContainerBehaviour+ResourcePotionData is not
registered in this provider. Creating a hero was enough to reach it, because that saves the hero's
starting items.
ComponentPayloadRoundTrip() could not have caught that: it round-trips GrindFest.SaveFormatTestPayload, a type of its own, chosen so that a component's data can change without rewriting the test. Both are needed - that one says the slot works, this one says the types do.
The keys are the components' own SaveKey strings, but they are not the subject here:
SaveKeysAreUniqueAndNamespaced() owns the key contract. This check is about the types.