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

Custom (Additional) Save format for Runtime #43

Closed Seneral closed 7 years ago

Seneral commented 8 years ago

Description: Current save format, ScriptableObjects, cannot be created and saved at runtime nor saved externally. So, a new save file format for runtime is needed. It should be optional for the Editor but essential for Runtime. Maybe Binary, but more likely XML, just like Substance's .sbs.

State: None. Along with it there should be an attribute-based tagging system for extra variables that need to be saved in each Node/NodeKnob subtype. The rest is hardcoded as it is known what to save, obviously. Please notify me before working on this to discuss some details:)

Seneral commented 8 years ago

\ Removed off-topic node creation discussion **

Seneral commented 7 years ago

New update: I'm finally working on this:) State: Aleady far in, most stuff stands and is integrated:)

The goal is to allow fast and easy implementation of own formats, even for custom databases. So as with most systems, it is fully modular, just extend the ImportExportFormat base class and program the IO routines:) Also, you can easily add an interface if you need, say, special access to a custom database to import/export to. No big deal, just a few lines of code in the format declaration itself.

Also, the NodeCanvas is optionally served in a seperate, linked and structured data format which makes it easier to interface with alot of formats like XML. It removes the need for caring about unique IDs, linking and also finding custom node variable data. Variables are fetched from the nodes just like any other serialization system does, accounting for public/private and the [System.NonSerialized] and [SerializeField] attributes.

So, in the end, most work is lifted off the actual format-specific implementation. As with many systems in the framework, it only needs a single additional class to implement a custom data format, be it as complex as you want:)

I'll finish the custom knob system #74 first though because of the obvious structural changes it comes with. Don't want to modify the format right after implementing it:)

As always, feedback appreciated. Seneral

Seneral commented 7 years ago

Finished this part aswell, import system is now fully functional with an XML format as a base:) Once again, this can easily be extended to own formats or even custom database access:) Will create a PR tomorrow...

Seneral commented 7 years ago

This too is finally merged and committed, would love to hear your feedback:) Will keep this open for some days... Seneral

Seneral commented 7 years ago

Alright, seems to run fine now:) IO Formats have full support (see XML Format)... Although I did not get feedback from users implementing custom formats or database accesses yet, I think it should prove fine:)