Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

DOTS Visual Scripting 3rd experimental drop

Discussion in 'Entity Component System' started by thierry_unity, Aug 13, 2019.

Thread Status:
Not open for further replies.
  1. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    Drop 4 is available here: https://forum.unity.com/threads/dots-visual-scripting-4th-experimental-drop.749273/
    --EDIT--

    Here we are,

    Drop 3 of Visual Scripting for DOTS!


    You'll need to create a project using at least 2019.3.0a11 (https://unity3d.com/unity/alpha/2019.3.0a11) and download the Visual Scripting Project




    Roll a Ball Demo

    We made a small demo project so you can see how it was made and how you can use Visual Scripting , Download it here


    Features

    - Component/events Editor:
    2019-08-13_11-07-26.jpg

    This window will let you create and edit Components or events. It's not the final version but it will help and unstuck a lot of our users.


    - Disabling Graphs and nodes:
    DisableEnableNodes.gif

    You can select specific section of a graph and disable them using the right mouse button menu. that code won't be executed or compiled. You can also disable that whole graph using the inspector on the graph, you should see the ''state'' options there. To access that in inspector, simply double click on the canvas of the selected graph


    - Description panel in searcher:
    SearcherPreview.gif
    We are showing the selected node in that panel before you need to add it on your canvas.


    - Graph Variables:

    More general variables that can be used in different functions at the same time


    - Unused nodes detection and styling:
    ShowUnusedNodes.gif

    Using the ''cog'' menu in your graph you can enable/disable this functionality. It will help you see what nodes are unused and aren't generating any code.


    - High Level Node: Debug Log
    DebugLog.gif

    We regrouped all the logs together to form 1 big node. You can simply switch the type of message you want to send, using the drop-down menu.



    Fixes

    • VSB-233 For All Entities variables does not exist in the current context
    • VSB-232 Empty criteria create compilation error
    • VSB-231 Equals node return multiple bools instead of only one
    • VSB-230 Deleting a macro asset will break all graphs that are using it
    • VSB-214 Set Time Scale ‘Time' does not contain a definition for 'time Scale'
    • VSB-211 Multiple Errors when creating nodes
    • VSB-208 Missing a refresh after deleting sticky note
    • VSB-207 Color Constant Node is getting alpha to black
    • VSB-203 Hover on "For each" nodes in searcher will create it
    • VSB-201 Moving component fields in cs file break nodes port connection order
    • VSB-200 Get Component Node not displaying its type list
    • VSB-196 Cannot create node that takes a pointer as parameter
    • VSB-193 Can't find Color Constant node
    • VSB-192 Renaming a graph don't rename it's cs script
    • VSB-190 Can't rename custom function
    • VSB-188 Copy paste a macro will put it in a stack
    • VSB-187 Styling of the searcher is broken
    • VSB-186 Naming in blackboard, breadcrumb doesn't follow selected graph
    • VSB-185 "local to world" criteria cannot be selected
    • VSB-184 Criteria section in function collapse in each refresh
    • VSB-180 Functions don't show return type
    • VSB-179 “Rotate by” node deform object when two axis are selected
    • VSB-178 Variable from events send error 'graphData' does not exist in the current context
    • VSB-177 Node duplication break when going in play mode
    • VSB-175 Creating a "Get input" breaks the visual scripting editor
    • VSB-165 Renaming a graph isn't showing up in toolbar when docked
    • VSB-164 "Float 4" UI in criteria is broken
    • VSB-35 Can't add Macro input and output ports in the blackboard


    Know issues

    • Visual on constant node is broken in the searcher description panel
    • Can only change system order between visual scripts
    • Performances issues when dragging edges after another edge connection
     
    Last edited: Oct 2, 2019
    Kiori, Lahcene, 5argon and 6 others like this.
  2. myanko

    myanko

    Joined:
    Nov 9, 2013
    Posts:
    56
    I have this error.
    Windows 10
    Unity 2019.3.0a11
    With the project roll a ball
    Error.png
     
    Last edited: Aug 13, 2019
  3. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    yes I just realized that the registry is not available outside our office... I'm building a zip file like we did in previous drops in the meantime.
     
  4. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    559
    please do NOT tell people to modify the
    registry
    key in manifest.json. you did this with the staging registry, and it caused a lot of unrelated problems.

    upm has now scoped registries, use that instead
     
  5. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    Edited the initial post with the project, hopefully this will work correct, sorry about that!
    - We will modify the Roll a Ball demo soon to have the same setup

    -EDIT-

    Roll a ball demo has been updated and should work now too
     
    Last edited: Aug 13, 2019
    TechnicalArtist and Silenus3 like this.
  6. Silenus3

    Silenus3

    Joined:
    Jun 5, 2019
    Posts:
    20
    when adding component , how to I set its type ?
     
  7. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    Not sure to understand what you are looking for? can you explain what you are trying to achieve? are you talking about the add component node?
     
  8. Silenus3

    Silenus3

    Joined:
    Jun 5, 2019
    Posts:
    20
    nevermind I just had trouble locating the + sign for adding a new field.
     
  9. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    It really took me awhile to get started with figuring out what i needed to get a ball moving from a blank scene.

    Maybe having events (On Start Entities, On Update Entities, etc) in the graph by default would be a better UX?
     
  10. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    We actually have support for that, we just haven't plugged it. Let me check.
     
    Ofx360 likes this.
  11. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    100
    I don't know if this is affecting anyone else but I can't seem to download the latest version of either the ball demo or the visual scripting project. When clicking the download link on the google drive file page a new tab opens and nothing happens.
     
  12. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    100
    I was able to get the links to work when downloading from Microsoft Edge, I'm currently using Vivaldi (a Chromium based browser) and it doesn't appear to work in Vivaldi. The first 2 drops worked in Vivaldi. I don't have Google Chrome installed so I couldn't test there.
    For anyone encountering the same trouble, you can try Edge or another browser engine and you might find success there.
     
    thierry_unity likes this.
  13. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    One quick comparison i can make with the UI/UX so far is with Unity's own VFX graph

    On boarding:

    upload_2019-8-15_10-9-26.png

    vs

    upload_2019-8-15_10-10-41.png
    (I know you said that you support a handful of events being in a fresh graph, so that's great)

    Accessing individual values:

    upload_2019-8-15_10-12-6.png

    vs

    (Also disabling a node is also a lot more of what you'd expect)
    upload_2019-8-15_10-12-52.png

    I personally feel like the VFX graph, even tho i'm no VFX artist, is a pretty good visual editing tool. Can't say i'm a fan of the vertical + horizontal form of editing that Unity seems to be going with...this seems to have a MUCH higher learning curve than the typical left to right systems most visual editors go with, but i digress. As far as this style of visual editing goes, the VFX graph made the idea of it a little more palatable with a lot of it's UI choices being well executed

    I understand this is deeply experimental, but i just want to put out the concern just in case. I would love for more of these tools to feel unified, especially if one of them is already well liked. Seeing style changes going from the Shader graph, to the VFX graph, to the Scripting graph is pretty odd when it's all supposed to be official tools from the same company. And worse yet, going from the VFX graph to the Scripting graph, seeing the same exact editor but offered up two different levels of interaction can be kind of annoying.

    Again, i feel the VFX graph is really nailing whatever this vertical + horizontal editing style is supposed to be, so I'd love to see more UI and UX shared between this and that.

    Another thing is the Component creation:

    upload_2019-8-15_10-46-47.png

    This is fine, but i wondering if it's possible to just have this in the inspector?

    I think I remember seeing the Tiny Mode having the ability to just edit the component from the inspector and i always though that was a solid visual solution. But having a whole separate window to do that seems a bit extra.

    I've only had a chance to actually use it for a short while the other day, and after i figured out how to actually iterate over an entity, i was able to get something moving pretty quick. And i love the code viewer! I wonder if it'd be possible to sync what you're selecting in the editor to whats highlighted in the code viewer. Maybe more work than it's worth, but that'd be neat. One thing that's was killing me though: Is there a way to create a float3 from a couple float1s? I can't seem to find a "combine", or a float3 with individual accessible values.
     
  14. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    Hi,

    Thank you for the feedback.

    On boarding: Visual scripting should by default create 3 empty event stacks linked to a query to help you on boarding and reduce repetitive work. At the moment we have a draft of the feature only in those 2 contexts. And the create graph from the project is totally empty at the moment.
    upload_2019-8-16_8-53-42.png
    upload_2019-8-16_9-1-10.png

    Accessing individual values:
    Yes, this is work in progress and is part of the goal, to get expending ports on nodes.

    Component creation:
    The component editor we have is just a temporary solution to unlock non-programmers. What Tiny got is the main goal for the final version.

    Combine float3:
    The node is pretty hard to find at the moment, it will be way more easier to do this operation in the futur with the expandable ports and we may also rename this node.
    upload_2019-8-16_9-22-10.png
     
    Last edited: Aug 16, 2019
    Ofx360 likes this.
  15. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    To get the events, simply press space bar on the background of your graph, the searcher should prompt in "Add a graph node" context. From this searcher context, you will see an Event section like the following one.
    upload_2019-8-16_9-10-25.png
     
  16. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    Thanks for the response! The on-boarding draft seems great

    And yeah, i was able to find the Events eventually after seeing that the code viewer wasn't updating no matter what i dragged into the editor. I thought i just needed to for loop over the entities. Then i started clicking around till i got to the Events then things started making sense
     
  17. Gordinho

    Gordinho

    Joined:
    Feb 10, 2013
    Posts:
    10
    Dear Unity.
    I had high hopes for your scripting language but it seems that you are trying to do a Bolt version.
    If you are going to make one and it looks like Bolt or playmaker, why waste time doing it?.
    In your roll a ball demo, just the amount of "code" to make the cube rotate is RIDICULOUS.
    I hope when you release this, you won't make the same mistake as playmaker/Bolt and say that this tool is for artists and non programers. You don't need to lie.
    When you announced it some year ago, or more, I made a comment on your video asking to not put your programmers working alone, to make them work with a person that didn't know how to program.
    You answered that you were listening.
    Obviously not.
     
    MarcoFco likes this.
  18. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    DOTS visual scripting is not like bolt. Unity recommended people try bolt for monobehaviour, regular C# projects.

    DOTS visual scripting is for ECS... and that creates a very specific way of working. Do you understand?
     
    Grizmu likes this.
  19. Phosfine

    Phosfine

    Joined:
    Nov 30, 2016
    Posts:
    1
    My main (and only, really) qualm with the UX right now is that the nodes take up a lot of space. One of the main handicaps of Visual Scripting in general is that a node will always take up a lot of room on the screen compared to just a few typed-out words, so my suggestion is that you could make the node headers thinner and give them some color. Blender's material editor is a good example of this. Each node ends up being a tad more compact, and it's also much faster to pick them out when they are placed in large groups or close together. To me it seems like headers are currently big because size is the only way to distinguish them from the rest of their node, but once color is added there is a lot more flexibility for different layouts and whatnot. It also looks better.
     
    Last edited: Aug 17, 2019
  20. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Have a look at playmaker, how simple the nodes look.

    And I would also try to match shader graph and visual scripting visually, it would make it feel more like a universal design language is followed for nodes.
     
    Antypodish likes this.
  21. Grizmu

    Grizmu

    Joined:
    Aug 27, 2013
    Posts:
    131
    AFAIK visual scripting is using new UI called UIElements, where you can easily modify style sheets to fit your needs, so there should be no problem at making the nodes look how you want them to. There's a huge thread on changing the 2019.3 editor style, and people already do crazy stuff with style sheets in there.
     
  22. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Thats good to know, although would it not be nice to have look consistent even without any modifications?
     
  23. Grizmu

    Grizmu

    Joined:
    Aug 27, 2013
    Posts:
    131
    Of course. Still it's a nice option for people that like to customize things, or won't agree to the final look of the nodes. With UI design it's hard to please everyone due to too many screen resolutions, DPIs, user sight problems, habits and preferences.
     
    Lars-Steenhoff likes this.
  24. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Totally agree that being able to customise it is the best, and also being able to custom color different nodes would also be a good way to quickly visually separate them.
     
    Grizmu likes this.
  25. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    With the Personal/Light Skin, some of the UI text colors and icons aren't calibrated to fit. As you can see it's hard to read the text and also hard to see the Add Field + Button.

    This might already be known but pointing it out. Similar things happened with Shader Graph and VFX Graph as they are made with the Dark Skin so some things for the Light Skin gets missed. They were quickly fixed though.

    upload_2019-8-17_0-44-50.png
     
    thierry_unity and theor-unity like this.
  26. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Please, add support for usual c# scripts and visual scripting.

    I would like to jump back and forth with visual scripting and code.
     
    MarcoFco likes this.
  27. Kiori

    Kiori

    Joined:
    Jun 25, 2014
    Posts:
    161
    This is great. Can we expect the current build to work with project Tiny?
     
  28. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    Thanks for your comments.

    Please keep in mind that visual scripting is not even a preview package. At the current state of life of the product, it is normal to see some actions that are harder to do as a non-programmer. For example, the rotate script in the roll a ball game use extra nodes to make it possible stop rotation of the entities when you pause the game. This extra part could be in the node as an option making you able to only link the node to your component values.

    I will be glad to see the scenarios you have in your mind and how you think it could be resolved with visual scripting to help us do something easy to use in the long term. This is the reason why we started to make the forum drops.

    For the first release, the main target will also be more technical as we build the foundation of the tool to make it more versatile. We will go from a lower level to get access to more functionalities and will start to add nodes that are easier to use to reduce the need of technicality.
     
    MarcoFco likes this.
  29. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
  30. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    We have a UX designer, a technical artist and a QA working on the project, driving the user facing development.

    Thank you for your feedback - despite the fact that you seem to be judging a final, released product when this is a very early build we decided to publish to keep the community in the loop.
     
    MarcoFco and hippocoder like this.
  31. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    Not yet, but we're thinking about it.

    Not yet either, but expect news about that in a near future :)

    We won't have fully bi-directional vs-to-code-to-vs conversion, but the goal is to let users create custom nodes from code, or to extract part of a graph to a separate node and optimize that node's code.
     
    Lars-Steenhoff likes this.
  32. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    UI/UX is not final. Our UX designer is working on it at the moment, so expect major changes soon.
     
    Lars-Steenhoff likes this.
  33. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    100
    Could this be used to write Jobs?
     
  34. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Will Visual scripting logic be similar to UDK's Kismet ?
     
  35. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    It will write jobs for you first and should let more advance users do their own jobs in the future.
     
  36. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    At some point, with our high level nodes, will get logic not so far away from Kismet. Which part of the logic did you enjoyed most?
     
  37. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    100
    I'm confused, are you saying its currently capable of writing Jobs? If so the workflow for that isn't clear to me, maybe I could get clarification?

    I am hoping to use it to do a bit of a 3 pass setup, where I prototype some jobs for a mesh modeling system, then move those jobs into pure code to do things too complicated for a visual interface. Then finally creating some higher level nodes to be used in more abstract visual scripts.
     
  38. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    This how we do jobs at the moment.
    upload_2019-8-26_12-49-54.png
     
    abrarjahin28 and hippocoder like this.
  39. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
  40. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    Thank you.
    Our logic won't be exactly the same, as we will get a smaller chunk of action that you can add after each other.
    Everything that is related to a specific kind of gameplay won't exist in the main visual scripting environment. Like the death event. This is the kind of stuff that you will need to create or bring in your project from assets like a visual scripting FPS for example.
     
    createtheimaginable likes this.
  41. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    Quick introduction video of visual scripting for the drop 3 version with current state of the tool.
     
  42. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    178
    It's really getting very good.

    I hope to see more Drops in the future, as this feature will greatly help the community.
     
    thierry_unity likes this.
  43. Gordinho

    Gordinho

    Joined:
    Feb 10, 2013
    Posts:
    10

    HI,
    I understand that its not a final product but if it looks/works and feels like this now, Im sure it won't be very different from the final version. You may put a layer of paint on top but the inside, in my opinion, is being done the wrong way.
    But hey, this is my opinion. I don't do code and so I tend to dislike everything that isn't intuitive. Just the example of the amount of "code" to make the cube rotate, is mind blowing.
    I appreciate Unity´s efforts but I really think you could do better.
    Probably this tool isn't for me. I guess I will have to wait. Maybe in Unity 3000. :)
     
  44. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    I think what your looking for are highlevel nodes. They will come at some point when people make them.

    Then you can have a high level node just for rotations
     
    thierry_unity likes this.
  45. MisterMartinez

    MisterMartinez

    Joined:
    Apr 23, 2017
    Posts:
    4
    I notice you mentioned it in your fixes, but I ran into a lot of weird problems when renaming components/graphs. It would often result in errors that weren't being displayed anywhere. A few things I would like to see:

    • Nodes like 'Add String' should have a button to 'add pin' to combine 3 or 4 strings together.
    • Dragging components in a query from the Blackboard doesn't seem to work.
    I got stuck after a while because I couldn't figure out how to instantiate a new entity without GameObjectCoverstionUtils.
     
  46. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    Hi,
    Thank you for the feedback.

    • Renaming components is not handled at the moment.
    • Renaming graph should work, but when you go to play mode, the old script will still be alive in this version and will be removed when leaving play mode.
    • The operator node should be using an extra pin like in vfx graph to give you something similar we will see with our UX for expandable ports if we do something directly on strings.
    • Dragging components from the blackboard won't work until the blackboard refactor with the new UX pass.
    For instantiation of game objects, you can do it like this. We still have lots of work to do, to make it easy to use in hybrid mode.
     
  47. MisterMartinez

    MisterMartinez

    Joined:
    Apr 23, 2017
    Posts:
    4
    Thanks for that, Eric! I tried using a GameObject but I got an error from a conversion utility in the graph (which failed to generate updated runtime code). Perhaps I just did something wrong, I'll try to repro again tonight and update this thread.

    If it does end up working, there should probably be a way to make that conversion clear to the user, I would want to know that I can use a GameObject or Archetype instead of Entity and when I use those other type, it should reflect in the graph that a conversion is happening.
     
  48. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    Yes, the feedback should be better, we are still transitioning from pure ECS to hybrid. Unity teams in general are working hard on the conversion pipeline to make it easier to understand for our users in the editor.
     
  49. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    611
    Out of curiosity, how is the edit workflow going to look like when ecs matures? Will something something eventually replace gameObjects for edit-time?
     
  50. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Our plan is to use game objects as the editing representation. We are doing a lot of work to remove boiler plate in this process however.

    Eg. you will be able to just make an IComponentData and the authoring MonoBehaviour & conversion code is automatically generated without having to write or maintain any of the code for simple cases.
     
    NotaNaN, MNNoxMortem, supron and 6 others like this.
Thread Status:
Not open for further replies.