Hi, I’m trying to build a behavior tree + blackboard to visualize AI behavior in my shooter game. I’m following a tutorial and did exactly how they did in them, but my one doesn’t work.
I have made a behavior tree and blackboard and connected them with each other. Then I made a connector in my AI controller program using UPROPERTY
Then I connected my behavior tree with the AI Controller script in the editor
Then I ran the tree from my controller in BeginPlay() with null pointer protection
But when I play the game in editor, the behavior tree shows inactive with no matching actors
I did some manual testing and figured out that my behavior tree gets disconnected from the AI controller script when I play the game. So the script receives null tree and the tree doesn’t get activated. But I connected them properly like everyone else.
If I pause the game and manually connect the tree with the controller script during run time, the tree becomes active. I’m new to unreal. I don’t understand why this is happening. Is this a race condition? How can i link the tree with my program peoperly so they don’t get disconnected?