Search Unity

DOTS Visual Scripting 4th experimental drop

Discussion in 'Entity Component System' started by ans_unity, Sep 23, 2019.

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

    ans_unity

    Unity Technologies

    Joined:
    Oct 12, 2017
    Posts:
    124
    Hi everyone,

    Drop 4 of Visual Scripting for DOTS is ready for you to try!
    https://drive.google.com/a/unity3d.com/file/d/1_Q0HfjvFt-ozprVrRrhPKkDa1yk45fYr/view?usp=sharing

    You'll need to create a project using at least 2019.3.0b1
    (https://unity3d.com/unity/beta/2019.3.0b1)


    Features
    • Codegen for coroutines (Wait node)
    • Establish High-Level Nodes documentation and priority
    • Remove Groups from VS (will be replaced by placemats)
    • Floating Graphview tool windows (you can move and dock the blackboard and the minimap)
    • Duplicate node (now both create and duplicate are available)

    Fixes
    • VSB-276 Dragging a criteria pills from function on canvas will make the graph unusable
    • VSB-265 Drag and drop pills from canvas to port is not always linking on node port
    • VSB-240 Conditional node breaks ui when added between two stacks
    • VSB-195 Searcher Constant Nodes Preview is broken
    • VSB-40 Drag and drop pills from stack header or blackboard to port is not always linking on node port

    Known issues
    • Nested coroutine won’t work for this version
    As with the previous experimental drops, this is work in progress that we share to engage in an open discussion with our community. Expect issues and weird workflows as we work our way up to a more final product.

    Most notably, we are still far from the final user experience, the complexity you see here is not representative of what we want to deliver. We have not yet created high level nodes to reduce the number of operations or finalized our UI to make interactions as intuitive they can be.

    So kindly take note of the usual disclaimers:
    • Not for production use.
    • Early picture of Visual Scripting, not be representative of the final version.
    • You will need to be tech savvy to use this version. Not yet ready for everyone.
    • Things will change.
    As always, we are looking for your comments.

    Enjoy!
     
    MehO, tigerleapgorge, twobob and 12 others like this.
  2. wpare

    wpare

    Joined:
    May 13, 2019
    Posts:
    1
    Dear Mr. @ans_unity

    When I try to launch the project using 2019.3.0b1, I get the below error message.

    Could you provide a list of steps to follow for the cleanest resolution of this problem?

    Thank you :)

    upload_2019-9-23_16-20-33.png
     
  3. AndrewKaninchen

    AndrewKaninchen

    Joined:
    Oct 30, 2016
    Posts:
    149
    "Floating Graphview tool windows (you can move and dock the blackboard and the minimap)"

    Does this mean there are now separate editor windows for each of those?
     
    tigerleapgorge likes this.
  4. createtheimaginable

    createtheimaginable

    Joined:
    Jan 30, 2019
    Posts:
    29
    I am getting the same error in 2019.3.0b4.

    When i click continue the Unity Editor loads but I do not get any of the Visual Scripting menus...

    When I go to the Package Manager the list of packages does not load.

    I also get an a lot of errors...

    Packages/com.unity.visualscripting.entities/Runtime/EventSystem.cs(13,89): error CS0246: The type or namespace name 'EntityManager' could not be found (are you missing a using directive or an assembly reference?)

    Packages/com.unity.graphtools.foundation/Editor/VisualScripting/Editor/Elements/Node.cs(6,19): error CS0234: The type or namespace name 'Searcher' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)
     
    Last edited: Sep 24, 2019
    tigerleapgorge likes this.
  5. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    thanks for the report, I'm investigating it... not sure why it's failing
     
    tigerleapgorge likes this.
  6. ans_unity

    ans_unity

    Unity Technologies

    Joined:
    Oct 12, 2017
    Posts:
    124
    We are looking at this issue and will send a fix ASAP.
     
    tigerleapgorge likes this.
  7. jocelyn_legault

    jocelyn_legault

    Unity Technologies

    Joined:
    Jan 16, 2019
    Posts:
    12
    Yes.
     
  8. ans_unity

    ans_unity

    Unity Technologies

    Joined:
    Oct 12, 2017
    Posts:
    124
    We made a fix (some dependencies were not accessible outside our VPN). You can re-download the file now and it will work.
    Sorry for the inconvenience.
     
    tigerleapgorge likes this.
  9. Singtaa

    Singtaa

    Joined:
    Dec 14, 2010
    Posts:
    492
    Hi, are the following currently supported?

    1) EntityCommandBuffer operations
    2) ComponentDataFromEntity/BufferFromEntity
    3) I see you can mark a comp as Subtractive, what about "Any"?
    4) Creation of custom nodes from code (not Macros)
    5) Custom/Multiple Worlds (e.g. how does live editing work when the system is running in multiple worlds?)

    Also another thing... when I try to double click on EcsStencil, it just opens my text editor (with the yaml). EcsStencil is for changing the system dependencies right? I'm using 2019.3.0b4.

    Thanks.
     
    Last edited: Sep 28, 2019
    tigerleapgorge likes this.
  10. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    Hello, thank you for testing it.

    1) Yes, automatically at this point. we're going for reasonnable defaults, we might expose more settings in the future
    2) Same
    3) Not supported yet, but good point
    4) You can either expose a static method using the [Node] attribute or create a custom node like we do (model, translation method and optionally UI
    5) Not handled yet
     
  11. sl1nk3_ubi

    sl1nk3_ubi

    Joined:
    Aug 21, 2019
    Posts:
    16
    Hello,

    Just a heads up, it seems the On Event node is broken in this version, seems to be a copy/paste error
    Code (CSharp):
    1. // GraphElementSearcherDatabaseExtensions.cs : Line 94 in the OnEvent block should be
    2. data => data.CreateNode<OnEventNodeModel>(name, n => n.EventTypeHandle = eventType.GenerateTypeHandle(db.Stencil))
    Other than that, this already feels very solid, good job!
     
    tigerleapgorge likes this.
  12. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    90
    (Since previous thread was closed.)
    1. Will it be possible to access all of Unity API in Visual Scripting? The particular thing I am interested in is mesh data. I want to procedurally generate mesh.
    2. Also, are we able to write our custom nodes and components in C# without vs? [it's important because sometimes developers want to be able to write code in C# but make high level custom nodes out of it], and how will the process look like?
    3. Is there a possibility that we could write custom nodes with data for things like [example] Dialogue graph that supports branching on conditions, executes different actions... etc. Or should we aim to write our own graph solutions based on UIElements and GraphView to support this kind of behaviour?
     
    tigerleapgorge, JoNax97 and Orimay like this.
  13. VI6-D-DARK-KING

    VI6-D-DARK-KING

    Joined:
    Apr 1, 2016
    Posts:
    4
    Ok, 2 things.

    First, when I Dock the Visual Script Window I can't see the nodes, they are still there since when I Box Select It gives me the option to change the color of the nodes, but I can't see them.

    Second, Currently there is no Save System, Not a surprise being Just a prototype The Question is Will there Be an Intergraded Save System at Launch and How Extensive will it be?
     
    tigerleapgorge likes this.
  14. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    Good catch, it's already fixed in our codebase. Thank you for the kind words !

    1. Yes, it's just a matter of exposing them. It's a list (EcsSearcherDatabaseProvider.k_PredefinedSearcherTypes) that should eventually be data driven.
    2. There's 3 ways to make nodes: sub graphs (functions and macros), straight c# (see 1.) and deriving NodeModel or
    HighLevelNodeModel (HighLevelNodeModel provides an inspector in the node for code gen options). Have a look at
    LogNodeModel.cs
    3. Yes. Two options: either write custom nodes for the ECS stencil or write a completely custom stencil and its matching translator. the graphtools foundation package is meant to be a framework for every node-based tool (serialization, ui, extensibility, transformation of the edit time graph to whatever runtime format you want : in our case, code, but it could be an asset too). No ETA on the framework being production ready, but we try to use it as user would to build VS ECS
     
    tigerleapgorge and PixelLifetime like this.
  15. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    Just want to say how much I appreciate the effort to make DOTs as usable in a practical sense as possible. Great work guys!
     
    MehO and theor-unity like this.
  16. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    VSBugReport.jpg
    I got a error message of "missing VSArrayExtension" while trying to instantiate an entity with random position.
     
    tigerleapgorge likes this.
  17. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    Sorry, this node is a left over from a previous iteration. We'll make a proper random node, probably in the next drop.
     
    tigerleapgorge likes this.
  18. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    I would like to be able to change the background color from black to a grey color, could you pass this background color control to the unity color settings, so I can choose my own color?
     
    Krajca, Ofx360 and Ryiah like this.
  19. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    That's something we should offer for all graph based tools (shader graph, vfx). I'll suggest it to the team handling the graph ui framework.
     
  20. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    Yes thanks!
    This is the menu I'm referring to

    Screenshot 2019-10-11 at 14.28.05.png
     
    theor-unity likes this.
  21. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    70
    Please allow us to use visual scripting to create custom editor, scriptable, timeline custom clip and tracks!
     
    myanko likes this.
  22. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    This is out of scope for VS 1.0, but definitely something I'd like to tackle later.
     
    sarum, hippocoder and vamky like this.
  23. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    70
    Yeah, I completely understand. There's definitely a lot works involved, I really hope unity's visual scripting solution can be deeply integrated into different development processes just like unreal blueprint (and better!).
     
  24. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    arraybug.jpg
    How can I create a new array in this VSTool? I click on the "Array" checkbox and get an error message. And there seems nothing changed in Code line 20.
     
    createtheimaginable likes this.
  25. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    short answer: you don't. We need to cleanup this part of the ui.

    The dots way to do that would be to author a bufferElementData (using the component editor if you want to), then add it to the query.
     
  26. HopefullyAnonymous

    HopefullyAnonymous

    Joined:
    Apr 13, 2019
    Posts:
    1
    Is Unity VS going to be able to code an entire game when released or at some point?
     
  27. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I'd say that will come down to three things:

    Which parts of Unity do not quickly get a DOTS/ECS equivalent.
    Whether the Unity VS tools plug some of these gaps by deciding to go beyond the purely ECS world in some areas.
    What sort of game.

    Possibly the safest assumption is that as this is a long journey involving multiple immature systems that are still evolving, there will be a long period where a hybrid approach makes the most sense for many projects. One where ECS is used for certain core aspects of the game that require the performance benefits it offers, and this is what the visual scripting tools will be used for. Over time ECS will expand into more areas of Unity, and various tools including the visual scripting will take account of this. And help bridge other gaps, depending on what needs and pain points emerge.
     
    hippocoder likes this.
  28. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    Eventually yes, as Elbows says:
    As an example, we'll start integrating the new dots physics soon.
     
    hippocoder and Onigiri like this.
  29. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39

    I made a simple demo using Visual Scripting Tool. It's an ideal tool help me understand how ECS works.
     
    konsic likes this.
  30. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    Nice ! The next version should have tracing - display/recording of values and which nodes are executed during the frame, that should help understanding what's going on and debugging.
     
    Lars-Steenhoff likes this.
  31. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    VS Tool is the best coding tool of ECS Framework. It let me focus on game logic, rather than get frustrated with daily updated Struct Interfaces and tedious declarations.
     
    Last edited: Oct 18, 2019
    soleron, MehO, hippocoder and 3 others like this.
  32. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    bug02.jpg
    I created a custom MacroNode as pic-1, and edit that node like pic-2, when I quit that node, and re-enter it , I got a new auto-layout as pic-3. Can you keep the user custom layout? Because those auto-layout nodes are overlap with each other. Another Question: how can I create an array of boolean in a custom node (in order to check if they are all true)?
     
  33. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    The auto layout should only happen when extracting nodes, that's a bug, thank you.

    Why do you need an array ? can't you use bool3/bool4 ? we might be able to codegen a fixed size bool*/stackalloc, I'll have to think about it
     
    Lars-Steenhoff likes this.
  34. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    Thank you for your reminding, I forgot bool4 works in this case. I wonder if BoidExample can be realized by VS-Tool, that example use a lot of Nativearray and NativeHashmap, that's why I mentioned about using array in VS-Tool for several times. I'm inplementing a tree-search project which also need array.
     
  35. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    There might be another bug: sometimes when I click on GetProperty Node and press space bar, my unity crash at the moment.
     
  36. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    What sort of limitations does DOTS have ATM? At one point it wasn't easy to use a prefab or use physics, and what can the VS package do right now? Can I learn it now or will I come to a barrier that will stop development?
     
  37. createtheimaginable

    createtheimaginable

    Joined:
    Jan 30, 2019
    Posts:
    29
    theory-unity, is another experimental drop coming soon?

    The good thing about the new 2019.3 betas is that ShaderGraph and VFX Graph are now working and I am thinking of using the VS Scripting to try to turn on/off some flags/tags for those 2 new features! :)

    I have had trouble trying get the b1 drop to work with the newest betas ( i. e. b8 ).
     
    Lars-Steenhoff likes this.
  38. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    Hey guys, we're creating a series of Visual Scripting Tool Tutorial video. Hope you like them!
    youtube link:
     
    MehO, konsic, MikeMarcin and 3 others like this.
  39. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
  40. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    we try to release one every 6 weeks, so next monday-ish !

    expect a lot of upcoming UX changes. Unity.Physics hasn't been integrated yet, but that should happen before the end of the year. Prefabs work but same thing about the UX. Remember we're still in a pre-alpha stage
     
  41. FernandoMK

    FernandoMK

    Joined:
    Feb 21, 2017
    Posts:
    178
    This is really getting amazing.

    Do you have any predictions of when a beta might arrive?
     
    thierry_unity and theor-unity like this.
  42. ans_unity

    ans_unity

    Unity Technologies

    Joined:
    Oct 12, 2017
    Posts:
    124
    Our goal is to release the preview package around GDC 2020.
     
  43. esc_marcin

    esc_marcin

    Joined:
    Sep 30, 2016
    Posts:
    23
    How do you reference a specific entity/GameObject rather than querying for a bunch of them?
     
  44. theor-unity

    theor-unity

    Unity Technologies

    Joined:
    Feb 26, 2016
    Posts:
    188
    At the moment: add a specific component to that object and the query.

    We're working on a more intuitive workflow for that (think "work on one specific object, then upgrade to an actual query if needed")
     
    MadeFromPolygons likes this.
  45. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39

    Chapter 3: Instantiate Entity and Create MacroNode in VS Tool
    Hey guys, hope you like our new tutorial video.


    We also met some bugs during recording the tutorial and VS graph was crashed. Some of the connect lines disppeared when click play run button. Remind: ALWAYS BACKUP YOUR GRAPHS IN A SEPERATE FOLDER, OR YOU'LL LOSE ALL YOUR WORK WHEN CRASHED.
     
    Last edited: Nov 4, 2019
  46. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    When will we be able to throw some code in via include or custom function node like in shader graph? The custom function feature within the graph being optionally include or code is such a lovely feature from shader graph that I'd probably actually switch our project structure to it.

    As it makes a proper bridge between the real programmers and the designers.
     
  47. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    see our video link above, it do support Macro Node.
     
  48. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Awesome, thanks. Not sure how I missed that.
     
  49. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39
    See our Tutorial Video above, Chapter 3, to see how to grap a singleton entity and instantiate it.
     
  50. wilson_p

    wilson_p

    Joined:
    Nov 4, 2018
    Posts:
    39

    Chapter 4: Boundary Detection and Destroy Entity within PostUpdate Command.
    Our new tutorial is coming. Hope you like it!
     
Thread Status:
Not open for further replies.