BTDecorator related cooking failure (ensure ObservedKeyNames.Num() > 0)

As I got rid of cooking errors and warnings one by one, there is only one left.

I have the exact error in this question that Mr.Mieszko answered.

And I also found this topic in the forums. I checked my setup and everything looks fine but the issue still persists. Another solution is needed.

Thank you.

I tracked down the decorator which was causing this problem. In it, I was calculating the distance between the AI and the player. I was doing this with “Get Controlled Pawn” nodes for each actor.

I replaced the “Get Controlled Pawn” nodes with "Blackboard Key Selector"s and used them to get the Player and the AI(Self) actors from the blackboard.

So what i get is that the decorators really like BB Key Selectors in them.

1 Like

This is the answer that works for me. The reason the engine complains is the decorator is supposed to abort lower priority nodes and the engine REALLY wants the decorator to have a Blackboard Key Selector variable exposed to the Behavior Tree. Adding that variable to the decorator and making it public resolved this issue.