Open ChadKeating opened 5 years ago
I made some changes to InstancePortList. Might be worth checking if it solves your issues.
Seems like there's some deeper rooted issues. Just having two dynamic port lists on one node causes a lot of issues.
Sorry for a late response, I havent worked on this part of our project in a while.
I updated xNode in our project today and the port lists still arent getting updated correctly. We do have multiple dynamic lists for both input and output.
As a workaround, we are just using NodeEditorGUILayout.reorderableListCache.Clear();
before updating any lists.
When setting the content of an instancePortList - that has been previously populated - the port list gui won't update.
The culprit in this case I believe is a private field:
NodeEditorGUILayout.reorderableListCache
If you clear or remove the node you update from this list then the gui will be updated.XNode.Node
example:This is a second issue that could be related but perhaps it needs it's own issue ticket. Assuming the above issue is fixed or there is a method to force the cache to update:
Calling
IncreaseContent
will display gui ports:"test1", "test2", "test3", "test4"
Then callingReduceContent
will change the displayed gui ports to:"test5", "test6", "test6", "test6"
This also then breaks the node for any further use and changes via the+
and-
controls in the editor gui throw null arguement and index out of bounds exceptions.XNode.Node
example: