[Request] Content Browser enable create Behavior Tree

Right now the only way I figured out to make a new Behavior Tree and it’s blackboard object is to copy their .uasset
s from the ShooterGame example, paste them into my project, and then wipe them.

Please add the ability to create a new BehaviorTree and it’s Blackboard object from the content browser

Hi Mike,

You can do this in Rocket Beta 6 by going to your Editor Settings > Preferences > Epic Labs > Enable editor for Behavior Trees. The Blackboad asset is a Data Asset that has the BlackboardData class. Create a new Data Asset and you will be prompted to choose the class. I hope this helps!



I’ll try that for the DataAsset.

How about the BehaviorTree itself?

Hey Mike,

Unfortunately, I have found that the Behavior Tree Class was not added to projects by default. This was an error with integration due to Behavior Trees being in development still. So a good option would be to do what you are doing with ShooterGame, as it was added to that. In an upcoming release, the class will be included by default.

Just so I am clear you can view but not add to or change the Behavior Tree in any large amount?

I was looking at adding another blueprint task but I have found no way of adding it or even how the BotSearch and BotShoot were added to begin with.

You can change a Behavior Tree, you just can’t add a new one in the Editor. The workaround is to copy/paste the BehaviorTree from the SHooterGame project into your own, then wipe the contents and rename it what you like.

Ok but how do you add the blueprint task like BotSearchEnemy and BotShootEnemy?

You add those in C++ and then assign them in the Behavior Tree Editor. That part works. I don’t have my project with me now, but could post instructions later tonight or this weekend. I copied the example in SHooterGame

Ok well I tried your idea and blank slated which the editor as well… as I am sure you and the staff already know the editor is a little vague on adding some things.

Ok that aside I figured I would start off VERY slow so I made a copy of the behavior tree and did not change anything except the name and then added it to the BotPawn as the controller. And for what ever reason I cannot fathom the bot just stands there and does nothing.

Can you only have one behavior tree currently?

And simply moving a node and saving breaks it?

I don’t know what the ShooterGame functionality was. I created my own classes. I was able to get it working, and stop on breakpoints on the Actions it called.

If you can tell me how you added your own behaviors into the behaviortree blueprint. I think I understand the adding code but when I try to add them I seem to only be able to add them as part of another node

To my controller I added:

	TSubobjectPtr BlackboardComp;

	TSubobjectPtr BehaviorComp;

To my pawn / bot I added:

UPROPERTY(EditAnywhere, Category=Behavior)
	class UBehaviorTree* CatBehavior;

It’s real simple right now, I have two tasks, jere’s the .h for one:

class UBTTask_ChaseLaser : public UBTTask_BlackboardBase

	virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent* OwnerComp, uint8* NodeMemory) const OVERRIDE;

And that’s it. THe base node and blackboard I had to copy in from the Shootergame. I renamed them after they were copied in and wiped. Then I added the new nodes to the Behavior tree through it’s editor. I looked at the ShooterGame one as a reference. Here are some screenshots that may help you figure it out:

ok that was what I was doing but trying to add the services from blueprints in, which I can see from your screen shots you are not using.