All Projects → MystikalPooka → Unity-Visual-Behavior-Tree

MystikalPooka / Unity-Visual-Behavior-Tree

Licence: MIT license
Reactive Visual Scripting Behavior Tree Tool for Unity 2018.x+

Programming Languages

C#
18002 projects
shell
77523 projects

Projects that are alternatives of or similar to Unity-Visual-Behavior-Tree

UnityDebug
A wrapper script for Unity debug calls to use conditional attributes in order to avoid debug code being compiled into release builds.
Stars: ✭ 29 (-19.44%)
Mutual labels:  gamedev, unity-editor, unity-scripts, unity2d
Unity Assetpipeline Presentation
Unity project for "A Technical Deep-Dive into Unity's Asset Pipeline" presented at Develop: 2018
Stars: ✭ 31 (-13.89%)
Mutual labels:  unity-editor, unity-scripts, unity2d
Unity Script Collection
A maintained collection of useful & free unity scripts / library's / plugins and extensions
Stars: ✭ 3,640 (+10011.11%)
Mutual labels:  unity-editor, unity-scripts, unity2d
CategoryTool
Unity Editor tool to create Categories in the Hierarchy. The Categories work as dividers between GameObjects.
Stars: ✭ 47 (+30.56%)
Mutual labels:  gamedev, unity-editor, unity-scripts
Behavior Tree
🌲 Manage React state with Behavior Trees
Stars: ✭ 85 (+136.11%)
Mutual labels:  behavior, tree
Deadsimple Pixel Perfect Camera
An exceedingly easy-to-use pixel perfect orthographic camera script for 2D scenes in Unity. Punch in a few specs and you've got a working pixel perfect camera. It's that easy.
Stars: ✭ 186 (+416.67%)
Mutual labels:  gamedev, unity2d
beehive
A flexible, modern, header-only implementation of behavior trees
Stars: ✭ 37 (+2.78%)
Mutual labels:  behavior, tree
download.unity.com
Unity Download http://unity3d.com/unity/download/archive
Stars: ✭ 90 (+150%)
Mutual labels:  unity-editor, unity2d
SimpleIncremental
A simple Unity project that introduces many of Unity's cooler advanced concepts.
Stars: ✭ 51 (+41.67%)
Mutual labels:  gamedev, unity2d
UnityHexagonLibrary2d
A library to manage 2D hexagonal tiles in Unity.
Stars: ✭ 58 (+61.11%)
Mutual labels:  unity-scripts, unity2d
DialogueGraph
Open-source node-based tool for developing branching conversation trees
Stars: ✭ 133 (+269.44%)
Mutual labels:  unity-editor, visual-scripting
Beaverandfairies
Stars: ✭ 14 (-61.11%)
Mutual labels:  gamedev, unity2d
Unity2d Components
A constantly evolving array of Unity C# components for 2D games, including classes for pixel art cameras, events & messaging, saving & loading game data, collision handlers, object pools, and more.
Stars: ✭ 375 (+941.67%)
Mutual labels:  gamedev, unity2d
Owl Bt
owl-bt is editor for Behavior trees. It has been inspired by Unreal engine behavior trees in a way, that it supports special node items like decorators and services. This makes trees smaller and much more readable.
Stars: ✭ 112 (+211.11%)
Mutual labels:  behavior, tree
awesome-unity
A curated list of awesome Unity games! 🎮
Stars: ✭ 346 (+861.11%)
Mutual labels:  unity-editor, unity-scripts
Object-Pooling-for-Unity
Object Pooling for Unity
Stars: ✭ 118 (+227.78%)
Mutual labels:  unity-scripts, unity2d
Unity-FPS-Counter
#NVJOB FPS Counter and Graph. Free Unity Asset.
Stars: ✭ 44 (+22.22%)
Mutual labels:  unity-scripts, unity2d
UGUI-Toolset
No description or website provided.
Stars: ✭ 14 (-61.11%)
Mutual labels:  unity-editor, unity-scripts
ScriptableObjectMultiSelectDropdown
Multi Select Dropdown for ScriptableObjects
Stars: ✭ 18 (-50%)
Mutual labels:  gamedev, unity-editor
gocs
GameObject Component System for Unity
Stars: ✭ 102 (+183.33%)
Mutual labels:  unity-scripts, unity2d

Build Status Join the chat at https://gitter.im/MystikalPooka/Unity-Visual-Behavior-Tree

Unity-Visual-Behavior-Tree (Name pending....)

Visual Scripting Behavior Tree Tool for Unity 2017.2.x+

Requires uniRX - reactive extensions for Unity by nuecc

Creating Behavior Trees

Introduction to Reactive eXtensions:

  • GREAT Introduction to RX here! (introtorx)

  • Another one (with shiny marble diagrams!)! (ReactiveX.io)

  • Great List of Tutorials (ReactiveX.io)

  • Interactive marble diagrams! (rxmarbles.com)

  • Step 1:

    Inherit from your choice of abstract behavior. Behavior type descriptions are below.
  • Step 2:

    Override the Tick() method as if it were Unity's update() method.
    • This method will receive a call to tick from its parent and will run as a coroutine until finished.
  • Step 3:

    This newly-created class will show up in the tree view window editor when opening a Behavior Tree Manager Asset either by double clicking it in unity or in the behavior manager.
    The treeview editor window is where these classes can be created, dragged and dropped, and rearranged visually. The Behavior Manager (explained below) will be responsible for instantiating instances of these behavior trees.

This is all done via reflection, so they automatically show up! Imgur Imgur Imgur

  • Step 4:

    Any monobehavior that you wish to have a behavior from these trees must have the Behavior Tree Manager component added to it.
    The Behavior Tree Manager component has the behavior tree asset field which is the tree that will be run when the game is started. It uses a ParallelRunner to run all base behaviors in the tree at the same time.

Types Of Behaviors

  • Behavior Components:

    Components have multiple children behaviors.
    • Selector:

      A Selector will run through its children behaviors one at a time.

      If the child | fails | the selector will choose the next behavior and run it.
      • The selector returns | succeed | when one of its children returns | succeed |.
    • Sequencer:

      A Sequencer will run through its children behaviors one at a time.

      If the child | succeeds | the sequencer will run the next child in sequence.
      • The sequencer will | succeed | when a child | fails |.
    • ParallelRunner:

      A ParallelRunner runs all of its children at the same time.

      The ParallelRunner keeps track of how many children fail or succeed.
      • If the NumberOfSucceed states is hit, the ParallelRunner returns | succeed | to its parent.
      • If the NumberOfFail states is hit, the ParallelRunner returns | Fail |to its parent.
      • If NumberOfSucceed AND the NumberOfFail ints are set to 0 the ParallelRunner will run | indefinitely |.
  • Behavior Decorator

    The Decorator has only one child. Useful for specialized conditions.
    • Inverter:

      Inverts the state of its child.

      • If the child returns | succeed | the inverter returns | fail |
      • If the child returns | fail | the inverter returns | succeed |
  • Behavior Node

    The Meat and Potatoes of every behavior!
    • This is where new behaviors are typically added.

    • Ignores any children it might (accidentally?) have. (Nodes are selfish like that)

Behavior Manager

The Component to make your monobehaviours BEHAVE.

The Behavior Manager is responsible for actually running your behavior trees.
It has a few parts:
  • Name: The name of the file and the name to save the tree as (will be replaced by something better later)
  • Behavior Tree File: The behavior tree to run for whatever this component is attached to
  • Seconds Between Ticks: The number of seconds between each tick. 0 is the same as a Unity Update() loop
  • Times To Tick: Number of times to tick. Used for debugging mostly. -1 for infinitely running
  • Splice Into Tree: Should the list of trees be enabled to splice other trees into this current tree?
  • List: The list of trees to splice into the current tree. These will be saved with the current tree when saving!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].