Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Node Graph [Custom Purpose Unity Built-in Node Graph]

Discussion in 'Scripting' started by PixelLifetime, Apr 8, 2019.

  1. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    55
    Unity has 2 graphs. VFX Graph and Shader Graph. Is there an api that lets you use the node editor for your own needs? Like if I would like to create the AI that would be node based or parametric generation, or dialogues... Is it possible to use built-in system for these tasks? If not, will this be added to roadmap?

    P.S. I know about open-source and other free node graphs available. I am not sure about their performance, or support in the future, their reliability, etc.
     
    Billy4184 and fherbst like this.
  2. Filtiarn_

    Filtiarn_

    Joined:
    Jan 24, 2013
    Posts:
    141
    I remember seeing at one of there keynotes that they plan to make graph UI avaliable for anyone to use. I'm not sure when, maybe when visual scripting comes out in 2020.1.
     
  3. Filtiarn_

    Filtiarn_

    Joined:
    Jan 24, 2013
    Posts:
    141
    Also I was just going to write my own node based AI ontop of units visual scripting tool coming out. You be able to make custom nodes.
     
  4. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    55
    My question is: will Unity release some API or better if Unity releases source code for UIElements that was used to create Shader / VFX graphs? It would be helpful in situations where you need to create graph with custom behaviour and custom nodes.

    I know it's possible to recreate the graph from scratch with either GUI or UIElements and some graphs are open source on the internet. But having native code and standardized approach for creating graphs would be very useful. Plus any updates, changes to API for the graph would be handled by the team responsible for Shader Graph and VFX Graph which in turn would save a lot of time of other developers as well as bring them the best experience in using graphs in unity.

    I am asking to be sure if such graph is on the roadmap or do we have to create one ourselves? Because it would be very heartbreaking if we have been working on a UIElements graph API for a long period of time and then suddenly Unity releases one and all that work, time and efforts would be gone as native one would support same/similar kind of behaviour.

    `The intended use of a graph would be for AI graph, branching dialogues, procedural generation...`

    Thank you for your time.

    P.S. if source code isn't in C++ but in C# - it would be very convenient to have it, because then again it allows for creating extensions for graph, assets for Asset Store and much more. To clear things what I imagine it's code that handles = drawing window, drawing nodes and connections, dragging nodes... Basically just some part of visual stuff that is shared between many types of graphs.
     
    Last edited: Aug 9, 2019
    Gekigengar likes this.
  5. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,728
    I've asked the same quesntion in the blog under the article about shadergraph. There was a reply they may open graph api later, as far as I remember.
     
    PixelLifetime likes this.
  6. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    55
    That is good news, but knowing the date could be very useful. If they decide to open it like a year from now - then there might be no point in waiting and creating your own graph would be a reasonable idea if you need it faster.
     
  7. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    55
    Moonblade-Studios and palex-nx like this.
  8. GameDevCouple

    GameDevCouple

    Joined:
    Oct 5, 2013
    Posts:
    2,424
    https://github.com/Siccity/xNode

    That one has amazing support, works well, code is clean and easy to extend, and is free. Give it a go :)
     
  9. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    55
    I have seen this one. Although, it's good - it uses GUI system which soon will be replaced by UIElements which scale better for this kind of thing (GUI will still be supported). And we can now use GraphView which is another step forward.
     
unityunity