Giter Site home page Giter Site logo

Comments (1)

alelievr avatar alelievr commented on May 28, 2024

Hello,

First, loading the graph can be made using standard unity loading functions such as Resources.Load, you'll then have access to the graph API to set external parameter or change some settings in your graph.

Then to be able to run the graph, you need a Processor. By default all the graphs uses this simple processor: ProcessGraphProcessor.cs it only supports traversing all the nodes in the graph and executing them. But there is an API to create your own processor: https://alelievr.github.io/NodeGraphProcessor/api/GraphProcessor.BaseGraphProcessor.html.

Here's a simple example of how the processor is used to process the graph:
https://github.com/alelievr/NodeGraphProcessor/blob/master/Assets/Scenes/RuntimeGraph.cs

There is a second graph processing algorithm in this repo which executes nodes conditionally (following a flow of conditional nodes like unreal blueprint system), here's the source file:
https://github.com/alelievr/NodeGraphProcessor/blob/master/Assets/Examples/ConditionalGraph/ConditionalProcessor.cs

As you can see the code is more complicated because there are several cases to handle branching and loops, I suppose you can take this as example to "jump" into the execution of some nodes.

from nodegraphprocessor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.