There's been some discussion in the discord about the section on saving not being as helpful as it could be. I've made an attempt to restructure the existing content and adding small bits of new content to hopefully clarify the page.
Prioritize explanation of SyncData - it's the core of saving, but doesn't show up until near the bottom of the explanation.
Link to MDN docs on ref since it's a somewhat rare C# construct, AFAIK.
Split explanation of SaveableTypeDefiner by purpose - saving classes vs. saving data structures
Flesh out explanation of saving data structures - the previous version mentioned saving data structures in the SyncData section and had an example of DefineContainerDefinitions but no direct explanation.
Included an example for the nested (e.g List<List<SomeType>>) case, as that was what tripped me up with the save system.
Ensured that the SaveableTypeDefiner example included SyncData, since some people seem to think the SavableTypeDefiner is an alternative to SyncData.
Added a specific section on the IsSaving/IsLoading pattern for SyncData (might be slightly redundant with the JSON section)
There's been some discussion in the discord about the section on saving not being as helpful as it could be. I've made an attempt to restructure the existing content and adding small bits of new content to hopefully clarify the page.
ref
since it's a somewhat rare C# construct, AFAIK.SyncData
section and had an example ofDefineContainerDefinitions
but no direct explanation.List<List<SomeType>>
) case, as that was what tripped me up with the save system.SaveableTypeDefiner
example includedSyncData
, since some people seem to think theSavableTypeDefiner
is an alternative toSyncData
.IsSaving
/IsLoading
pattern forSyncData
(might be slightly redundant with the JSON section)