AI not working as expected when game packaged...

So I have been able to package my game but now a serious problem has come up, my starting enemy isn’t running its behavior tree. I have a variable control if the enemy is active or not since one of them breaks thru a door at a scripted moment. In the packaged game I can see in the AI debugger that it is set to not active but I have even tried to set that variable true thru the level BP at begin play so that should not be true…

It is strange since it works fine when I play it thru the editor. Is there something in the packaging options that I have overlooked? Anyone else experience strange things with the AI when packaged?

Any ideas is much appreciated :slight_smile:

I fixed it. Some of the variables I set in the level editor(on the AI actor BP) did not get set in the package, so I made sure those got set accordingly in the game instead. Hope that makes sense.

To add on:

This is the first hit on google so I will type my solution:
So the issue was that in a packaged build my behavior tree wasn’t working sometimes but always failed the move to.
It had a service to determine a random location.
The navmesh existed and worked with non BT ai move to nodes.
When testing if the air existed and possessed it was true.
Afterwards I checked if the BTS fired. It did.
However the blackboard values were all floatmax.
It turns out that since one of the value failed to get registered correctly, it would all fail. ONLY IN PACKAGED BUILDS. IT WORKED FINE IN PIE.

So the solution was to set the values in the BTS by casting to the owner and getting the blackboard all set first before using them.
I also had to create a service to figure out my enums in the first selector as well.
Again, no issues in editor; fails in packaged build.