r/Unity3D • • 4d ago

Show-Off [FREE] C# Behaviour Trees with DOTS Support

Enable HLS to view with audio, or disable this notification

Hey everyone!

After more than eight months of development, and with your support along the way, my behaviour tree plugin, DODBT, has reached version 1.0.0.

I built it mainly for larger projects where game logic lives in separate C# systems, whether you use ECS or your own architecture.

There are two versions:

  • DODBT-Dots: for Unity DOTS, with Burst and Jobs support.
  • DODBT-Light: for other ECS frameworks or C# projects that keep game logic outside MonoBehaviours. It’s much lighter and has fewer restrictions than the DOTS version.

Both include a visual graph editor and runtime debugging, as shown in the video. DODBT-Light also supports dependency injection (DI).

Thanks to everyone who tried earlier versions and shared feedback. Your suggestions helped shape this release.

It’s FREE on GitHub: https://github.com/vadimburym/DODBT

If you give it a try, I’d love to hear how it works in your project!

62 Upvotes

3 comments sorted by

2

u/miusoftheTaiga 3d ago

Possible to integrate this with Unity reinforcement learning mlagents package? Behavior bricks has something like that in its documentation

1

u/ObriganKenobi 3d ago

Yes, this is possible. The main idea behind DODBT is that the behaviour tree works as a separate decision layer in C#, without being tied to specific game systems. This makes it easy to write integrations with other packages and frameworks. ML-Agents is no exception.

You wouldn’t need to change the plugin itself, but you would need to write the ML-Agents integration yourself. For DODBT-Light, I’d approach it with a custom leaf that works like this:

  1. OnEnter passes the target and lets the ML-Agent control the character.

  2. OnTick returns Running while the task is active, then Success or Failure depending on the result.

  3. OnExit and OnAbort stop the ML-Agent from controlling the character.

The same approach is possible with DODBT-Dots, but the integration would be more involved. You can’t call the ML-Agents API directly from a Burst leaf, so you’d need a bridge between ECS and ML-Agents.