I am experimenting a bit with the GraphView features and I was wondering, if I could create a node, that contains other nodes and resizes to encompass all those nodes when the child nodes are moved around. I am also a bit puzzled about some of the Node functionality. For example, how can I set a node to a fixed size and prevent it from resizing automatically?
I am a step further. I can just use a class derived from UnityEditor.Experimental.GraphView.Group to achieve what I want. I only have to override the AcceptsElement method and add my desired child node types there.
Hi Chris!
GraphView is experimental, so keep in mind that the API may break at any release and is not officially supported. We are working on a new shiny GraphToolFoundation witch will be the successor to GraphView, but there is nothing public yet.
I am curious, what kind of tool you are building?
Do you still have a question overall?
I am building a simple tool for choose-your-own-adventure like games. The nodes will represent the choices and story flow for the game. A little bit like the Dialogue Tree examples you can find everywhere online, but with a few extra added features that make it a bit more complicated. Also my first real project using Addressables, so maybe I will even be able to make it completely moddable.
How hard will it be to switch my current code for the GraphView to the new GraphToolFoundation, once it comes out?
I didn’t do any conversion myself, but I did gather some feedback from someone who has: There is a lot of work in the transition. You might be able to keep some elements if you mostly write them as individual elements and adds them to the graph nodes instead of directly overriding the nodes.
Any little, unofficial, not bounding hint when it will be coming out? ![]()
It is not in 2022.2 / 2022.3 (the alpha of 2022.2 is over, and I haven’t seen it going through, no new features for the LTS version)
It will probably show up in the c# reference without any announcement, as we will migrate VFXGraph and shaderGraph to validate the API before making it public. The team developing it is really focussed on providing a stable foundation for any editor tool that would be based on this.
more detail here : GraphView & GraphTools foundation - what can we expect in the near future?