Search Unity

Please Let Us (or Can We?) Name States (Nodes?) in Flow Graphs

Discussion in 'Visual Scripting' started by westingtyler, Mar 29, 2021.

  1. westingtyler

    westingtyler

    Joined:
    Dec 7, 2013
    Posts:
    34
    tl;dr can we name States/Units in flow graphs like we can in Playmaker? I need this functionality for my brain to plan a graph efficiently.

    Hello! I started using 2021.1 today to learn the exciting Visual Scripting. I currently use Playmaker, and the way my brain is able to plan things out is to create a bunch of empty states in a playmaker FSM, name them with a description of the step to take in that state ("get the total player count", "add them to a new array"), then fill them in with actions once I've visually worked out the flow process I need to do. My brain needs to lay things out with these clear labels to build a framework and figure out what I need to do. It's very helpful for us visual people who benefit most from visual scripting. It's "visual planning", then just filling in the framework created. It's great.

    It seems Unity Visual Scripting has Flow Graphs and State Machines. The State Machines let you name the states, but I can't just drag them out and create a bunch and link them in a chain to draft the layout of the system. But this is really strange in a way that made me realize that since I use Playmaker, I've actually been making Flow graphs the whole time in Playmaker and not a state machine. So in the new Visual Scripting I made a Flow Graph, but now I find I can't create a bunch of empty "nodes" linked in a chain, then naming them to create the visual draft, then filling them in with actions.

    So I'm stuck and can't plan things smoothly. I could start, I dunno, drawing it all out on a sheet of paper first, several times as I draft it all, but then I'd have to go remake it all perfectly in Unity Flow Graphs, then go back to paper to continue, which starts to defeat the efficient neural value of doing the visual scripting. I guess I'm used to "visual planning" too, and it's a bummer how much harder it would be for my brain to work if I can't just name the flow states.

    it's also strange that I need two different types of visual graphs depending on if I want a flow setup or a state. In playmaker it flows until you have a state with 'every frame' ticked on the actions, at which point it becomes an active state. It seems clunky to not be able to mix them smoothly in one graph.

    Is there already some way to do name states in Flow Graphs like you can in Playmaker? Even if they have to be like, fake "comment states" or something I have to replace later with real flow nodes, that'd still be clunky, but then at least I could get to planning a flow graph again.

    Is there something awesome I'm just too noobish to see? I'm going to keep experimenting and learning.
     
  2. MasterSubby

    MasterSubby

    Joined:
    Sep 5, 2012
    Posts:
    252
    There are State Units. Have you tried those? Can embed state Machines inside flow graphs, these can be renamed and contain a whole state Machine of their own. It isn't exposed to the top level, you'll need to double click the unit to open it. But you can freely mix the two. Super units are another option. You could make an empty reusable one with just one control input, one output, embed each as you lay them out and can rename those. That's the two options in aware of.

    Also the community add-ons extensions do have To Do units. Which you could right click replace when you've layed it out.