Hopefully this is the right question category. I didn’t see a “Graph View” option, so opted for the more generic “Scripting”.
I have a ton of Graph View tools in our project already, so I understand the basics of Graph View, but one feature remains a mystery to me. In shader graph, you have “default nodes” - nodes that represent the default state of a param and move with their parent node and can’t be deleted. They also crucially disappear when another node takes over their connection.
Can anybody point me to the parts of the documentation that are relevant for this? I’d love to implement this in my own graph tools. Even just the formal name of these default nodes would be a huge help so I could begin searching the right parts of the documentation.
GraphView does not offer the feature in any way. So ShaderGraph just uses a custom GraphElement (PortInputView) that wraps the control for the value and draws that little Edge
…and move with their parent node…
In this case it’s just a child.
For other cases, maybe you are also interested in using the Type Attacher. It’s used attach 2 GraphElements when they are not child of each other.
Anyways, if you dont know the type you are looking at, you should use the “UI Toolkit Debugger” so you can inspect what you are seeing
Ah, thank you. I assumed it wasn’t quite “out of the box” functionality, but this leads me in the right direction. I completely forgot the UI Toolkit Debugger existed, so that’s a helpful reminder as well.