GithubHelp home page GithubHelp logo

bubdm / actiongraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spydarlee/actiongraph

0.0 0.0 0.0 27 KB

A simple visual tool for crafting and structuring finite state machines in Unity in a modular way.

License: Creative Commons Zero v1.0 Universal

C# 100.00%

actiongraph's Introduction

ActionGraph

A simple (work-in-progress) visual tool for crafting and structuring finite state machines in Unity in a modular way by creating states from a series of small, self-contained and re-usable actions.

Installation

Simply clone or download this repository and put everything (the ActionGraph folder) in your Unity Assets folder. That's it!

Usage

ActionGraph is still very much a work in progress and I would not currently reccomend using for anything other than a a learning resource at the moment. That being said, here's a guide to getting started:

Creating a new Graph

  • Add a Graph component to a GameObject in your scene
  • Click the 'Open Editor' button or go to Window -> ActionGraph Editor to bring up the editor window
  • Right-click anywhere to add a node (a container for a series of actions)
    • The only difference between a Standard Node and a Transition Node is the latter will cause Graph.IsTransitioning to return true while it is running
  • Click the 'Add New Action' button to pick from any of the Actions in your project
  • This will bring up the ActionGraph Inspector (AGInspector) window which is similar to the standard Unity inspector but used to modify ActionGraph elements such as Actions and Conditions
  • Left-click and drag from one of the small white circles surrounding a node to create a connection between two nodes
  • Left-click the larger white circle in the middle of the connection to modify the Conditions that are required for that connection to execute

Writing custom Actions and Conditions

  • Custom Actions should inherit from the Action class and can implement OnStart, OnUpdate, and OnFinish to execute their logic When the action has done its work it should call FinishAction (which is what will trigger OnFinish to be called)
  • Custom Conditions should inherit from the Condition class and need only implement Check which returns true or false

Extra Notes

  • WARNING: ActionGraph doesn't always save changes automatically so be sure to use the 'Save' button in the top-left corner of the ActionGraph window regularly.
  • You can set which node should execute first by right-clicking a node and selecting 'Make Start Node'

actiongraph's People

Contributors

spydarlee avatar

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.