Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Is Unity's Visual Scripting any good in Unity 2021 LTS ?

Discussion in 'Visual Scripting' started by atomicjoe, Aug 6, 2022.

?

Is Visual Scripting actually good on Unity 2021 LTS ?

  1. Yes, it's great!

    25.0%
  2. No, it's not, just use C# instead.

    75.0%
  1. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,705
    There are lots of comments about Unity's Visual Scripting being slow, memory hungry and a GC garbage generator, but they are spread over lots of years and I don't know if it is still the case or not.

    So, can anyone with experience using the Visual Scripting package on Unity 2021 summarize what is the current state of affairs?
    I'm a programmer, so coding in C# isn't an issue for me, but having to make hundreds of little scripts for every super specific situation of my game is not really the best idea, and that's why I'm looking into Visual Scripting: to use it to animate and program my scenes on a very fine level of detail.

    So, how is Visual Scripting in Unity 2021 LTS ?
    Is it worth the time spent learning to use it?
    Does it actually work?

    Any feedback is very much appreciated.
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Use C#
     
    atomicjoe likes this.
  3. ncr100

    ncr100

    Joined:
    Jul 23, 2015
    Posts:
    22
    Last edited: Aug 6, 2022
    atomicjoe likes this.
  4. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,705
    My plan for Visual Scripting was to program things that would be one-of-a-kind for specific scenes: things that I wouldn't be reusing over and over.

    So, I wouldn't be using it for performance critical things, but I worry the visual scripts could generate garbage per frame or otherwise put memory pressure and make my game stutter.
    I'm not familiar with Bolt, so I really don't know what to expect.

    I have experience with PlayMaker though, and performance was great with that visual scripting (and customizability too), although I stumbled on a pesky bug that corrupted my global variables, so I just removed it and forgot about it until now.
    That was a lot of years ago though, so I guess they must have fixed it by now.

    Is Unity's Visual Scripting on par with PlayMaker?
    I would rather use Unity's internal solution because I hate dependencies on external plugins, but if PlayMaker is better, I'll go with that one instead.

    Any thoughts?
     
  5. ncr100

    ncr100

    Joined:
    Jul 23, 2015
    Posts:
    22
    I'm a noob to VS and 0 experience with PlayMaker. I believe PM is better for certain scenarios. VS is really just Bolt, with some name changes and conveniences around getting-started, from what I can tell. EDIT: Lots of bugfixes and some performance improvements, per Changelog. Better summary of changes HERE.

    VS-next, whenever that is released, will be performant ... that is the expectation that Unity has set, repeatedly. LOOKING AT YOU, UNITY-ICANS .. !

    As for CPU/memory churn with the current VS, I believe there are issues. The forum has some discussions talking about GC hiccups.

    I think your idea is good, to program over tricky issues. That is, if you use VS for some aspects of your game.

    Another strategy that I'd recommend considering is creating a dummy project that utilizes in ISOLATION the visual scripting features which you'll be relying upon. It's hard to do that because "I use it all" could be the challenge. The dummy project would exercise the features, perhaps in a loop, and you could attach a debugger to that to look for anything crappy.

    Story-time: In the past when I've depended upon frameworks, I kicked myself for not testing out the features first, and being upset by a LONG bug chase, and not suspecting the 3rd party code, then realizing it was the framework. I do write a lot of bugs, but there are many risks for issues with Unity.x.y.z + Anything, because in my experience as a 6-year user, Unity Inc is still fairly reactive instead of proactive, especially in the area of feature-integration. Quality is hard, for sure.
     
    Last edited: Aug 7, 2022
    PanthenEye and atomicjoe like this.
  6. ncr100

    ncr100

    Joined:
    Jul 23, 2015
    Posts:
    22
  7. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,021
    Functionally and architecturally current UVS is identical to Bolt 1 from 2018, when it stopped being developed in favor of developing Bolt 2, which was then acquired and discontinued by Unity. It's now a bit more performant in the editor when displaying large graphs, but otherwise all the other core issues remain such as suboptimal performance, no refactoring tooling, serialization issues such as the undo bug whiping whole graphs empty, lack of basic features like graph search and safe variable renaming. And those are just some highlights. The list of things wrong with UVS right now is pretty damn long.

    More or less the same as when UVS first released, arguably more stable, but there are also serious new issues introduced like the inability to run builds on IL2CPP platforms when using custom nodes from assemblies that reference Unity editor. This includes a slew of first party tooling like Cinemachine, most asset store editor extensions and your own code if you don't split your code into editor and runtime assemblies where the runtime assembly can't even include #if UNITY_EDITOR conditional compilation code.


    Use Flow Canvas and/or Node Canvas or Playmaker instead. Those are actually proven in production, unlike Bolt/UVS.

    They've made 0 improvements in the two+ years they owned the tool. All the big changes and improvements are coming in the next major version of the UVS in Unity 2023 or Unity 2024. Everything will be changing then. It'll have a new runtime with a new API, and they'll replace the current IMGUI UI solution with Graph Tools Foundation framework, which is UI toolkit based. Hopefully, they'll also get rid of FullSerializer Bolt/UVS is based on. ie the tool will undergo major changes in the midterm.

    Current UVS is in maintenance mode, they've refocused on the next major version of the tool. And as it is now, UVS does not differ from Bolt 1. The engine integration has not improved after acquisition, it's still as much bolted on as any other asset store VS system. The difference is the other systems are actually usable in production and you won't have to wait 4-6 months for a possible bug fix that might never land. Unity are incredibly slow to hotfix even major issues. Asset store devs of actively maintained VS systems like Flow Canvas or Playmaker will fix your bug sometimes in the same day. As an ex-Bolt user, I wouldn't use UVS as it is now in production either.
     
    Last edited: Aug 7, 2022
    ncr100 and atomicjoe like this.
  8. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,705
    Thank you very much for the complete summary!
    It's pretty bad overall, but the #if UNITY_EDITOR thing with IL2CPP is a complete deal breaker for me, because I use it on nearly all my C# scripts.

    The funny thing is that while looking for info about Playmaker's current state of development, I discovered the bug I suffered more than 9 years ago is still alive and kicking! (it's not a small thing, mind you, as it will corrupt Playmaker's global variables at a project wide level, can't be recovered and doesn't even need you to save the scene for it to permanently screw your project)

    It seems like visual scripting in Unity is not in good shape overall LOL!

    I haven't tried flow canvas, is it as good as Playmaker (without the bugs LOL) ?
     
  9. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,021
    Flow Canvas is nearly identical to UVS workflow wise, just some naming differences, and it supports a lot more features than UVS too. See comparison chart here: https://flowcanvas.paradoxnotion.com/features-comparison/

    Can't comment much on bugs since I don't use any VS systems in Unity right now but the author regularly issues maintenance updates, and he responds on the official forums for the tool to all threads posted there in a timely manner: https://flowcanvas.paradoxnotion.com/forums/forum/root/general-discussion/ He's also known to issue hotfixes on Discord on occasion, but forums is a more reliable form of communication with him.

    Also check out the games made with Flow Canvas and Node Canvas. There are some III and AA titles on there.
     
    atomicjoe likes this.
  10. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Unity's VS is little more than a bullet point on the sales pitch. I do not expect it to ever scale for large productions, like anything in Unity.
     
    atomicjoe likes this.
  11. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,021
    For sure, some higher-up decided to integrate Bolt 1 into the core of the engine for that bulletpoint. Two years have gone by with minor bugfixes and now they're basically scrapping it and writing a new, proper one.

    I've talked to some of the people working on it. They're solid developers and know what they're doing. The problem is the management. I don't believe anyone who knows Unity and/or Bolt thought it was good for core engine integration. This is the result of some sales team shmuck doing their job badly. And if Unity leadership values sales people's opinions over engineers, it sets a worrying precedent.

    The ex-Bolt community made sure that UVS team is aware of all current problems before moving on to better things - other VS systems in Unity or other engines altogether. And the UVS team is addressing many of those issues for the current UVS successor. They're also contacting folks at AAA studios and asking them what they need. So I have mild hopes that the next major version could be decent. Time will tell.
     
    atomicjoe likes this.
  12. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I dunno, I don't use Unity for higher end game production. But I guess if they reduce GC and test it properly on console it might be usable one day.

    Staff all know I know their situation, and never blame 'em. They try, they really do - however can only achieve so much when the higher ups aren't really interested in indie creative games. Probably because it's the smallest part of Unity's actual income.
     
  13. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,705
    Flow Canvas and Node Canvas always confused me.
    Seems like the same thing. I mean, I know Node Canvas is oriented to AI, but both look like state-machine visual graphs...

    I'm checking Flow Canvas right now and I see it looks a lot like Bolt. I mean, it's based on C# reflections, which has the potential to be both great and bad news.

    Yeeeeah... seems like it.
    Like when they bought ProBuilder. (TextMeshPro is awesome though!)

    Flow Canvas seems like the more robust solution at first glance, judging by the glowing reviews.
    The thing is: it's actually a lot like C# coding but much more cumbersome than actual C# coding LOL

    I mean: Playmaker isn't anything like C#, it's much more streamlined, quick and easy to do small things with because it's actually a collection of high level macros that run C# scripts underneath.
    It makes programming simple things much quicker, but on the other hand it doesn't rely on reflections, so if you want something that isn't already there, you'll have to program a node yourself in C#, which is a pain in the butt.

    Flow Canvas, UVS (Bolt) and UE BluePrint (as far as I know), on the contrary seem just like programming in C# but with huge visual blocks, which doesn't look particularly useful from my point of view, as is it can become verbose and tedious very very quickly, as the methods haven't been streamline for visual coding.

    I'm starting to wonder why people use this kind of visual scripting instead of just, you know, write some actual code, since it's actually the same in the end.

    (you can tell I'm completely noob on visual scripting LOL )
     
  14. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Probuilder is a little easier to be used in production though, to be fair. No GC, and editor side only (if you are sensible).
     
    atomicjoe likes this.
  15. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,021
    Flow Canvas == UVS Script Graphs. Basically, C# visualizers, where each reflected node corresponds to one Unity C# API entry. The power of these tools lies in being able to write custom highly reusable nodes and then arrange them in novel combinations so you don't have to write X amount of variations for existing scripts. It's not beneficial for all game types but for something like a point'n'click adventure game, where each character has unique interactions with branching true/false decision trees, visual scripting is a good fit since it's hard to do branching in regular Inspector.

    Node Canvas has both Playmaker-like Finite State Machines and Behaviour Designer-like Behaviour trees with the possibility to nest behaviour trees inside state machines, which is how Naugty Dog did AI for Uncharacted, for example. No other tool in Unity offers that right now.

    But while Behaviour Trees are intended only for AI, finite state machines can be used for more general scripting. Playmaker does basic scripting all in state machines, which is also pretty unique and in my view kinda backwards. When I think of basic scripting, I don't see FSM as my first choice. Playmaker also has a pretty weird implementation of a state machine, i.e. it has no On Exit State cleanup, you have to clean things up in the next state.

    So by going Flow Canvas + Node Canvas route, you get both UVS like scripting in Flow Canvas and you get Playmaker like state machines in Node Canvas and FC/NC both deeply integrate with an optional bridge download so you can also nest Flow Canvas graphs in Node Canvas state machines and Behavior Trees.
     
    ncr100 and atomicjoe like this.
  16. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,705
    Yep. Good point!

    I have a primal fear of dependency hell... lol

    Maybe I'm too low level to get all this high level benefits lol.
     
  17. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,021
    That's sorta why I'm not using any VS tools right now lol. It's very hard to trust 3rd party tools but if you have to then FC/NC are good picks. The author has supported them for many years, longer than Bolt has existed even. Most of the things I work on right now can be managed with Odin Inspector powered custom editors, so for now I'm sticking with that.
     
    atomicjoe likes this.
  18. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,705
    Yeah, I think I'll give Flow Canvas a chance, but if it becomes too cumbersome, I'll just go back to C#.
     
  19. Catsploration

    Catsploration

    Joined:
    Mar 9, 2021
    Posts:
    54
    According to the roadmap, "Stability and bug fixes" have been released, and nothing is currently planned except support for behavior nodes.

    Everything else is under consideration.

    theor-unity writes,
    Unity's Visual Scripting is currently meant to be an aid for productivity and iteration. Released packages should be converted to C#? I don't think this is entirely reasonable since released games still have years of iteration ahead of them.

    I'm very grateful to ParadoxNotion, Playmaker, and other asset developers for giving us workable solutions that are maintained over the years. Acquisitions of software alone does not guarantee maintenance, we need the people.

    Roadmap: https://unity.com/roadmap/unity-platform/gameplay
    Quote source: https://forum.unity.com/threads/bolt-performance-vs-c.1003433/
     
    atomicjoe likes this.