I created a Behavior tree for my AI, and when I play it without ue4 engine, as a standalone game it works perfectly but as soon as I package it, the AI does not do what its supposed to do, it does not move to the player as I have set it to, or roam, however it worked in the main menu, but not in an actual game, please help me this is for a Uni project and I have searched the entire internet for a solution. Also worth mentioning that I have checked the navmesh and I even have force rebuild on
I know you said you checked nav mesh but just in case you missed it give this a try:
Click Edit> Go To Project Settings >In the Search Bar Type: Spawn Nav Data in Nav Bounds Level > Make sure it is checked > Repackage the Project.
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.