Behavior Designer - DOTS Powered Behavior Trees RELEASED!

Behavior Designer Pro
Available on the Asset Store

For technical support please post on the Opsive Forums or Discord for community support.
Behavior trees are used by AAA studios to create lifelike AI. With Opsive’s Behavior Designer Pro, you can bring behaviour trees to Unity using the power of DOTS! It can be used with both GameObjects and Entities and can be used by any game genre.

Behavior Designer Pro offers an intuitive visual editor with a powerful API allowing you to easily create new gameplay and editor functionality. It also includes a smart, fast delegate system and integrations with third party assets making it possible to create complex AIs without having to write a single line of code!

Behavior Designer Pro was created from the ground up using the DOTS architecture making it efficient in both data organization and processing. No DOTS knowledge is necessary in order to use Behavior Designer Pro.

Asset Store | Documentation | Videos

Features:

• DOTS architecture
• An intuitive visual editor
• A familiar API
• Visual runtime debugger
• Shared variables to communicate between tasks
• Conditional Aborts
• Save/Load
• Event system
• Use existing code with fast delegate tasks
• Evaluate tasks using Utility Theory
• Realtime error detection
• Zero runtime allocations after startup
• Extensible editor
• Extensive documentation
• 15 sample projects scenes
• Much more…

7 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?

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.

I appreciate it :slight_smile: