Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2.01k stars 414 forks source link

Old canvases are not usable after upgrading Node_Editor #16

Closed ritave closed 8 years ago

ritave commented 8 years ago

ScriptableObjects (and so are the nodes) are only ever loadable if they have the same structure than before, otherwise they're silently nulled. Since sometimes between commits the structure of the Node.cs changes and thus old saved canvases stop working.

It's a bit of an abstract issue / feature (also big) to make saves stable but maybe it's worth thinking about?

ritave commented 8 years ago

I edited the saves manually after upgrade and the one problem is that guids of the objects change after upgrade -> I removed all the Node_Editor files and added them again so the guids changed. Second is the changing structure of Node.cs (continueCalculation field)

Seneral commented 8 years ago

Yeah that should mostly be fixed now as I added the meta files of relevant scripts, so the guids should be kept after updating. I hope so atleast;) Regarding the save format change, thats true. There might be a solution to most changes, I'd need to find a way to get the default values for each node type maybe by implementing a functin or moving some stuff like allowsRecusion and continueCalculation to properties that can be overridden by node types.