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.34k stars 387 forks source link

Is there a way to guarantee ordering of inputs on a node? #131

Closed emrys90 closed 3 years ago

emrys90 commented 3 years ago

I have a derived class where one of my inputs in the derived class is above the inputs in the base class. Ideally I would like derived class inputs to always be below the base class

alelievr commented 3 years ago

Right now, it's not possible, but it's a good feature request and there are already a couple of TODO in the code talking about this

alelievr commented 3 years ago

I fixed the sorting code, now inherited fields will be displayed first in the node as it makes more sense. There's also a new function OverrideFieldOrder that you can override to do your custom sorting https://github.com/alelievr/NodeGraphProcessor/commit/65587d6922acd6cea67a455bff8aa1b130d5932c