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.26k stars 375 forks source link

Parameters Cannot Be Deleted (2019.2 & 2019.3, MacOS) #24

Closed TeorikDeli closed 5 years ago

TeorikDeli commented 5 years ago

Hi!

It seems, deleting a parameter doesn't work. I tried to edit ExposedParameterFieldView for a possible fix, but I am not too familiar with the UIElements & GraphView yet and I couldn't find a way 🤷🏻‍♂️

Anyway; if I add a parameter and then delete it, it visually deletes from the list but doesn't actually removes from the list. If I add a new parameter, the deleted parameter is shown again or If I save, close and reopen the graph, the deleted parameter is shown again too.

It may be a Unity bug, but there is no problem in ShaderGraph.

Renaming is works by the way.

TeorikDeli commented 5 years ago

Well, I fixed it with changing parent.Remove(this) in ExposedParameterFieldView:34 to graphView.graph.RemoveExposedParameter(parameter)

I'll create a PR in the future (if it won't be fixed), but not yet.