Search Unity

Bug Any State Transitions Cause Multiple States to Run Simultaneously

Discussion in 'Visual Scripting' started by BlenderBlaster, Apr 18, 2023.

  1. BlenderBlaster

    BlenderBlaster

    Joined:
    Sep 22, 2014
    Posts:
    6
    I'm running into this bug and it's essentially a showstopper. Using Any State to transition into a new state does not exit the currently running state, leading to multiple states running simultaneously. This has been an issue for years now but I don't see any attention being given to it:

    https://forum.unity.com/threads/any-state-leads-to-more-than-one-simultaneous-active-state.1248709/
    https://forum.unity.com/threads/how-to-use-any-state.1152761/
    https://forum.unity.com/threads/any-state-exit-previous-state-when-entering-new-state.1132126/

    The workaround that some people have figured out is to connect Any State to every single other node with an empty transition, but that's absolutely ludicrous and will make my State Machines unreadable. Is there any plan to fix this or any more acceptable workaround?
     
    PanthenEye likes this.
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,073
    Have you reported this as a bug from the editor? That's the only way this will get any official response.
     
  3. BlenderBlaster

    BlenderBlaster

    Joined:
    Sep 22, 2014
    Posts:
    6
    I can go ahead and do so, although frankly I'm shocked anybody is able to use Visual Scripting State Machines at all when such a core feature is so blatantly broken.
     
  4. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,073
    It's in a weird state right now, UVS is pretty new and most users are people new to Unity who don't know how to report bugs because they haven't done it before, and also can't discern what is a bug or their own mistakes so it goes unreported.

    Meanwhile, experienced Unity users have tried it out, see the significantly increased domain reload and enter Play mode times that slow down iteration, see all the AOT issues, the performance issues due to type boxing and reflection, the compatibility issues with CI/CD pipelines and many other problems inherent to the tool's design that they skip using it altogether.

    Or they implement their own tools with GraphView and UI Toolkit or adapt one of the asset store products proven in production like Node Canvas or skip visual scripting entirely. So people who can discern what is or is not a bug don't use the tool or don't bother to report the bug because it's time consuming and Unity aren't known for speedy bug fixes even if the bug is confirmed.

    Also, the current version of the tool is basically in maintenance mode, they're doing what seems to be a full rewrite with a new backend runtime that'll eliminate type boxing and the use of reflection from builds, and will also completely replace the UI frontend from IMGUI to UI Toolkit based Graph Tools Foundation framework, which is the upcoming successor to GraphView API. Until this happens, no new features will come to the current version of the tool and they'll only address showstopping bugs with minor hotfix releases. It's also unknown when this new major version will release, definitely not this year.

    I'm currently not using Visual Scripting as it's slated to undergo major changes on every level, and the current version simply has too many issues that haven't really changed since 2018 when Bolt stopped being developed in favor of its successor Bolt 2. Visual Scripting is simply re-skinned Bolt with a little better editor performance and a very rudimentary new Input System support, they haven't really improved anything yet.
     
    Last edited: Apr 18, 2023
  5. BlenderBlaster

    BlenderBlaster

    Joined:
    Sep 22, 2014
    Posts:
    6
    Yeah, I bit the bullet and just bought Node Canvas + Flow Canvas. It's a real shame because I was able to author almost an entire boss battle with the built in Visual Scripting (not without some gripes), and all I wanted was to add a way for it to change to a final state from Any State when it reached low health, but this bug just renders that impossible. Huge shame that Unity squashed Bolt 2, from the looks of it it was almost on par with UE blueprints. Node Canvas is pretty decent so far, though.
     
  6. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,073
    Unlike UVS, Flow Canvas and Node Canvas have been proven in production in many titles, some very well known in the industry so you're unlikely to have buyer's remorse. Flow Canvas is less pleasing to the eye and its search is a lot more basic, but in all other respects it's more feature rich and more performant than UVS.

    Bolt 2 really would've been a gamechanger as far as visual scripting in Unity goes. It's really unfortunate they discontinued it but I also understand their reasoning, I'm lowkey hoping the next major version of UVS will live up to the hype and finally fix all the current fundamental issues with the tool. Only time will tell.