McManning / BlueGraph

Visual Scripting Framework for Unity
MIT License
240 stars 33 forks source link

Add version number to Graph #4

Closed McManning closed 4 years ago

McManning commented 4 years ago

Add a version number baked onto Graph so that migrations can be safely handled in case of backwards breaking changes to how graphs are persisted.

McManning commented 4 years ago

I need some references on this one - because slapping a version field on Graph is fine and all but if changes are drastic enough to break deserialization then it's not like it'd help.

McManning commented 4 years ago

Found an example in Microsoft's MR toolkit, maybe applicable here:

https://github.com/microsoft/MixedRealityToolkit-Unity/blob/06a06778e38da622b37cc299a93f16e143b7bdeb/Assets/MRTK/SDK/Features/UX/Scripts/Collections/GridObjectCollection.cs#L520-L580

McManning commented 4 years ago

This was added (a few commits ago - forgot to tag) as Graph.m_Version. I can refer to Microsoft's MR project if I ever need to figure out upgrade paths.