Behavior Designer - Behavior Trees for Everyone

Behavior Designer
Available on the Asset Store

For technical support please post on the Opsive Forums or Discord for community support.

Behavior Designer is a behavior tree implementation designed for everyone - programmers, artists, designers. Behavior Designer offers a powerful API allowing you to easily create new tasks. It also offers an intuitive visual editor with hundreds of tasks and PlayMaker/uScript integration making it possible to create complex AIs without having to write a single line of code!

Behavior Designer was designed from the ground up to be as efficient as possible. As a result, it runs great on all platforms including mobile. It works with both Unity and Unity Pro.

Asset Store | Overview | Documentation | Samples | Videos

Features:

  • Create believable AI with an intuitive visual editor
  • A powerful API gives plenty of freedom for programmers
  • Debug with a visual runtime debugger using breakpoints, watched variables, and task execution status
  • Use local and global variables to easily communicate between tasks and behavior trees
  • Includes hundreds of tasks including parallel, interrupt and semaphore guard
  • Make your behavior trees dynamic with Conditional Aborts (similar to Observer Aborts in Unreal Engine 4)
  • React to changes with the built in event system
  • Use existing code with the included reflection tasks
  • Find errors quickly with realtime error detection
  • Binary or JSON serialization
  • Data-Oriented design for exceptional performance with zero runtime allocations after initialization
  • Object drawers (similar to property drawers)
  • Includes runtime source code
  • Works with Unity 5 and Unity or Unity Pro
  • Extensive documentation and tutorial videos
  • Sample projects available online

Third Party Integration:

  • 2D Toolkit
  • A* Pathfinding Project (with the Movement Pack)
  • Adventure Creator
  • Anti-Cheat Toolkit
  • Apex Path (with the Movement Pack)
  • Blox2
  • Camera Path Animator
  • Cinema Director
  • Control Freak
  • Core GameKit
  • Curvy
  • Dialogue System
  • DOTween
  • Final IK
  • Inventory Pro
  • LeanTween
  • Love/Hate
  • Master Audio
  • NavMesh 2D (with the Movement Pack)
  • NGUI
  • ORK (with Gamekakkak integration)
  • PlayMaker
  • Poly|Nav (with the Movement Pack)
  • Pool Boss
  • Pool Manager
  • Simple Waypoint System
  • Third Person Controller
  • Trigger Event Pro
  • uScript
  • uSequencer
  • Vectrosity

1514905--95970--$BehaviorTreesForEveryone.png

6 Likes

Hello,

It looks good, how much are you going to sell it ? Any free or test version planned ?

Regards,

Interesting. Price point?

Thanks for taking a look at it. I havenā€™t completely decided on the price but I think that Iā€™ll have a launch price of around $50 and then move it to $95 eventually. I do plan on creating a free version, it just wonā€™t be ready at launch.

Will it be open source ?

Can we extend the system, implement our own nodes, customize their look in the graph ?

Youā€™ll be able to easily create any type of task that you want (action, composite, conditional, or decorator) and the runtime source code is available but editor will have a DLL.

I am currently finishing up the documentation and hereā€™s an example of a simple task that the documentation will walk you through:

using UnityEngine;
using BehaviorDesigner.Runtime.Tasks;

public class MoveTowards : Action
{
   public Transform target = null;
   public float speed = 0;

   public override TaskStatus OnUpdate()
   {
       // Return a task status of success once we've reached the target
       if (Vector3.SqrMagnitude(transform.position - target.position) < 1) {
           return TaskStatus.Success;
       }
       // We haven't reached the target yet so keep moving towards it
       transform.position = Vector3.MoveTowards(transform.position, target.position, speed * Time.deltaTime);
       return TaskStatus.Running;
   }

   // OnReset is called by the inspector
   public override void OnReset()
   {
       target = null;
       speed = 0;
   }
}

You will be able to edit the image that appears in the graph by adding a task icon attribute to the class:

[TaskIcon("path/to/icon.png")]
public class MoveTowards : Action
{
...

FYI, the term ā€œopen sourceā€ does not mean ā€œthe commercial product I bought comes with source codeā€:
http://en.wikipedia.org/wiki/Open_source

@Steve Tack

What term would you suggest people use when they want to differentiate between DLLed assets and ones with the C#/UnityScript included?

I know that this isnā€™t the most exciting topic but weā€™ve added the documentation. Major topics include an overview of Behavior Designer, writing a new task, PlayMaker integration, and uScript integration. If you are completely new to behavior trees take a look at the what is a behavior tree page.

I still need to upload content to the videos and samples page. I should be able to submit to the Asset Store within the next day or two so hopefully it will be available next week.

Iā€™ve purchased every behavior tree on the asset store and surprisingly none of them have made tutorials so I usually give them 1 star.

I hope you have more sense then them (excluding NodeCanvas, they have a tutorial :slight_smile: ) and make tutorials explaining how to use your assetā€¦ donā€™t be shy and speak in them :). not a rush job.

You will have success with this if you take the time to make comprehensive tutorials, also you will save a lot of time in the forum answering the same questions again and again.

The others have failed, maybe you will succeed :slight_smile:

I completely agree. I have already recorded four videos that will give an introduction to Behavior Designer totaling about 30 minutes of content, and yes I did speak in them :slight_smile: So far the topics have been an overview, writing a new task, PlayMaker integration, and uScript integration. I have created four sample projects and I plan on making a video for each of those explaining how they work as well. In addition I think that it would be good to have a short video on the task attributes.

That sounds great :slight_smile:

will you be supporting mecanim?

I havenā€™t specifically created a task for mecanim but that doesnā€™t mean I canā€™t get one in before I hit submit. What are you looking for? One of the nice things about the Behavior Designer system is that it is really easy to create new tasks - basically it is like creating a new MonoBehaviour object except the update function has a return status. For example, I just wrote the following task which starts an animation state based off of a trigger. When the animation is done playing it will return success (this is completely untested but should work):

using UnityEngine;
using BehaviorDesigner.Runtime.Tasks;

public class PlayMecanim : Action
{
    public string targetState = "";
    public string eventName = ""; // the event that will trigger the stateName

    private Animator thisAnimator = null;
    private int stateHash = 0;

    public override void OnAwake()
    {
        // cache for quick lookup
        thisAnimator = gameObject.GetComponent<Animator>();
        stateHash = Animator.StringToHash(targetState);
    }

    public override void OnStart()
    {
        // trigger an event which will start targetState
        StartCoroutine(playOnce(eventName));
    }

    public override TaskStatus OnUpdate()
    {
        var currentState = thisAnimator.GetCurrentAnimatorStateInfo(0);
        // if the current state is equal to the targetState hash then the animation isn't finished playing yet
        if (currentState.nameHash == stateHash) {
            return TaskStatus.Running;
        }

        // the animation is no longer playing
        return TaskStatus.Success;
    }

    private IEnumerator playOnce(string eventName)
    {
        thisAnimator.SetBool(eventName, true);
        yield return null;
        thisAnimator.SetBool(eventName, false);
    }
}

Cheers for well written documentation. I hate video tutorials and itā€™s a shame that solid documentation is still somewhat rare on the store.

If you are using common class names like in that example I hope you are wrapping it in its own namespace btw.

An issue Iā€™ve had with other behavior tree implementations is they actually do too much or are too glitchy. Being too intrusive is a problem as I am writing the actual logic myself and have all the pathfinding already completed. I just want a lightweight framework for designing behavior flow and debugging AI states in the editor. Your framework suited to that?

[quote=ā€œSilly_Rollo_1, post:14, topic: 528417, username:Silly_Rollo_1ā€]
If you are using common class names like in that example I hope you are wrapping it in its own namespace btw.
[/quote]We are still supporting Unity 3.5.7 and namespaces werenā€™t really supported until Unity 4 so we have prefixed all of the tasks with ā€œBDTask_ā€. Whenever we set the minimum version to Unity 4 weā€™ll transition to namespaces but for now this is a good compromise. Edit: nevermind, Behavior Designer does use namespaces and the minimum Unity version is Unity 4.

Behavior Designer will stay out of your way :slight_smile: There really will be no real game-specific functionality with the default Behavior Designer installation. We have lots of well-commented tasks with the sample projects that do include game logic and pathfinding but the base installation will ship with these tasks. As you can see, most of them are very generic and none of them are really game specific.

Behavior Designer has been submitted and is awaiting approval! I updated the first post to include the promo images that will be used on the Asset Store. I also uploaded the sample projects so you can take a look at the structure of the tasks.

In my last post I responded to Fuzzy_Slippers about namespaces saying that we arenā€™t using any and weā€™ve prefixed the tasks with ā€œBDTask_ā€. I started to think about that some more and decided against it. Behavior Designer was submitted with Unity 4.0 and does use namespaces so it should be able to import into any project without problems.

Hey opsive! thanks for that. seeing that your BT system will work with playmaker, Iā€™ll just use your BT for the AI and utilize playmakers mecanim functionsā€¦ I think that would work best :slight_smile:

Thanks for the effort, I wasnā€™t expecting you to do that :slight_smile:

whats the price for this asset?

``[quote=ā€œBuildABurgerBurg_1, post:17, topic: 528417, username:BuildABurgerBurg_1ā€]
Hey opsive! thanks for that. seeing that your BT system will work with playmaker, Iā€™ll just use your BT for the AI and utilize playmakers mecanim functionsā€¦ I think that would work best :slight_smile:
[/quote]
That sounds like it should work great.

I am listing it at $50 for an introductory price then once that is over $95.

I hope you reconsider the DLL only package. A lot, of developer shy away from assets which are DLL only, especially on time critical projects where changes are needed quickly or as a safety net incase the publisher support wanes. The asset looks amazing regardless, definitely the best looking and documented behavior tree asset in the store. :slight_smile:

Edit: The entire runtime no longer has a DLL!

All of the different task types are not hidden away in a DLL so if you need to make changes to a particular task it is available. It also will show you how easy it is to create new tasks, including composite tasks. That said, I definitely see the appeal of having a source code version. In terms of support, if you take a look at the reviews of my other assets youā€™ll see that I am generally able to fix any bugs within the same day. In a previous post I mentioned that I plan on eventually listing a free version, and I also plan on listing a version that includes the source for the runtime. With that Iā€™d like to be able to offer an ā€˜upgradeā€™ plan: if you purchase the DLL version, all you need to do is pay the difference for the source version.

[quote]
The asset looks amazing regardless, definitely the best looking and documented behavior tree asset in the store. :slight_smile:
[/quote]I appreciate it :slight_smile: