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 415 forks source link

Modularity Update on Canvas and Traversal algorithms #109

Closed Seneral closed 7 years ago

Seneral commented 7 years ago

This update streamlines the process of adding new types of canvases with new properties, behaviours, requirements and traversal algorithms to the framework in a modular way. Canvas behaviour can be scripted by controlling many aspects of the canvas and it's modifications. It's also possible to add new ways of traversing these canvases, either similar to the default calculation, a statemachine, a dialogue system, or just a data visualizer, this is now possible without workarounds.

WARNING: I seperated the default calculation behaviour from canvas base class, making it a seperate subclass, and NodeCanvas now serves only as a base class. Due to compability with previous save files (which would be broken if NodeCanvas was now abstract) it's now weakly limited (canvases with default type are possible but prohibited). In order to use previous saves, you first have to specify a valid type (any Canvas subclass) after loading. Also note later on NodeCanvas WILL be made abstract and thus older saves will be broken!

Included is a Graph Canvas type with seperate (yet empty) traversal behaviour to show how easily canvases can be scripted.

Feedback appreciated!

NOTE: This update is a continuation of #90