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

Dynamically add or remove knobs in the editor #126

Closed molocai closed 7 years ago

molocai commented 7 years ago

Hello,

I want to be able to fold/unfold one of my nodes so I need to be able to draw/undraw knobs in the editor. I'm currently doing this in NodeGUI but I cannot remove drawn knobs after I deleted them from the output knobs array.

Any leads?

Seneral commented 7 years ago

This is currently not possible​ but is planned for future updates. One problem with hiding the knobs is the connections of them. What you could do for now is adding a bool in NodeKnob.cs that toggles visibility in DrawKnob and also change Node.DrawConnections to retarget the connection to the knob's side's center when the knob is set to be invisible;) Hope this helps, sorry atm I can't help with code very much...