alelievr / NodeGraphProcessor

Node graph editor framework focused on data processing using Unity UIElements and C# 4.6
https://github.com/alelievr/NodeGraphProcessor/projects/2
MIT License
2.28k stars 379 forks source link

Custom Node Creation Menu Items #206

Open dannymate opened 2 years ago

dannymate commented 2 years ago

Added attribute for setting methods as custom node creation menu items. Same as the NodeMenuItem.

Switched return type in BaseGraphView & NodeProvider to string, Type, Func<Type, Vector2, BaseNode> to match my new methods for returning the new attribute methods. This way we enforce all attributes to the correct Node creation format and can use the BaseNode.CreateNode method.

I haven't implemented graph specificity yet.

I've also added an example.

I imagine this will be a breaking change for GraphViews.