Search Unity

Some updated tools for use with VS - Null Texture fix | Multi-Window | Game View max FPS

Discussion in 'Visual Scripting' started by Trindenberg, Jan 23, 2022.

  1. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    Hi,

    Having experienced a few breaking things in Visual Scripting, I fixed those for myself with a few bits here and there, initially an add-on script in Scene which wasn't desirable, now not required.

    • Null Texture/Invisible Icons - Still couldn't figure out the root cause (hopefully Unity do as this is a real usability breaker issue). The only solution was to Reload Script Assemblies when exiting play mode
    • Major graph lag on the Game View non-maximized - I don't always maximize game view, it's nice to have the tools visible. Default to 60fps is why it takes frame speed from Game View (although Scene View is the other fps hog). It's a difference of 300fps or 30fps in game view, making game view unusable outside of maximize, unless closing/reopening graphs
    • No multiple window support - I could find it on older versions, but was only ever able to show the one graph in multiple. Maybe there's a reason why unavailable, but I can think of many reason why it's useful!
    Visual Scripting Tools.cs (attached):

    • Put it in an Editor folder (as it's editor only you don't want it in build). Menu functions in Tools/Purer Logic | Visual Scripting Tools
    • Add a Visual Scripting Tools Preferences asset via Project/Create/... ideally in the same Editor folder - for saving your preferences when entering/exiting play mode
    • Reload on exit play mode - Simply reloads script assemblies when exiting play mode. Also manually using Shift+Alt+R
    • Unload unused assets on exit play mode - Just to free up memory (Unity loves my memory!) also Shift+Alt+U
    • Set graph repaint FPS on enter play mode - I added some presets in the menu, but you can set on enter play mode in preferences. Shift+Alt+0, 1 or 6, will Freeze at 0fps, set to 15fps, or reset to default 60fps
    • Add new/add new unique window - Add a new duplicate window, or lock the current window and add a new unique window (selecting a new graph will only change the new window). Each graph window has a lock button in the top left, easily missed (for use with multiple)
    • Menu/Preferences... - Will take you directly to the asset in the Project window
    • Menu/Help... - A reminder of the above
    Hope it helps with your flow!

    Hopefully Unity fix the null texture issue for users who experience it, it's got to be the most breaking problem if experienced (as well as filling memory with 100,000 errors until crash or script assembly reload)
     

    Attached Files:

    Last edited: Jan 28, 2022
  2. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    Updated the previous attachment, error/not found if running without having added the scriptable Preferences.
     
    AdrianoDeRegino likes this.
  3. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    Tidied up a few things/bugs, main file above updated.

    Changing the repaint speed and effect on GameView in Editor non-maximized (with 2 graphs open). Frozen graphs do partially update with the mouse over them.

    upload_2022-1-28_22-30-54.png

    Preference asset in project (also set a custom Play Mode graph speed)

    upload_2022-1-28_22-31-53.png
     
    AdrianoDeRegino likes this.
  4. AdrianoDeRegino

    AdrianoDeRegino

    Joined:
    Aug 10, 2019
    Posts:
    87
    That's awesome! Thanks
     
    Trindenberg likes this.
  5. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    108
    Really? Unity introduced a breaking null texture bug and hasn't fixed it for months? I don't recall this bug with Bolt. I've recently migrated from Bolt and there don't seem to be any great improvements so far. At least in the design. They haven't even implemented node search this whole time... This bug didn't exist in Bolt, right?

    Wonder how this tool works with the newest UVS. I'm a bit afraid it would break things if not maintained in the future. Thanks for trying to make UVS better.

    Edit: Just tried some random code with Texture Literal and it wasn't null. Is this bug reported? How do I reproduce it?
     
    Last edited: Aug 8, 2022
  6. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    I think it will still work, been a while since I used Unity / VS. Not sure if the Null Texture issue was fixed or what was the cause, but easy enough to add script reload on exit if it happens before your memory explodes. I started on Bolt when it became free don't recall any issues, also managed to upgrade a simple project to the latest UVS (but it wasn't straightforward). Mostly had high hopes for 1.8 high performance interpreter (no longer happening at this moment in time).
     
  7. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    108
    Ohh. Better performance would be great indeed :( I really hope something good is coming this year.
     
  8. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    108
    I managed to open a second window by clicking on a Subgraph node inside a graph and then clicking "Open in new window" in the Context Menu that pops up after right-clicking. Works flawlessly and you can keep it forever and open whatever you want. Just like with Bolt. No add-ons required.
     
  9. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    You can open the same graph, can you open 2 separate graphs though? Didnt find this.
     
  10. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    108
    Of course! Would be useless otherwise. You can open more than 2.

    What I'm afraid of now is that this may have slipped through Unity's fingers and is not as they have intended and they might "fix" it one day...
     
  11. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    398
    As in you can view a sub level/sub graph of same graph.
     
  12. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    108
    Everything as how it was with Bolt. Looks like very few have discovered this but it changes everything :)