AI Perception doesn’t work in development build

I have a custom AI character using AI Perception. And I also have custom settings for each sense. Everything seems to work as planned when I PIE. But when I do a build, the AI characters don’t move and turning on the AI debug, I can see that the AI Perception senses have its default settings applied (sight radius, etc.)

Do I have to initialise the AI Perception or something somewhere else before building? Or is this a bug? I tried putting the AI Perception component on either the AI controller or the AI character. Both of them seem to do the same thing

Bump! Anybody else having this issue? I’ve tried everything and my AI character doesn’t work when I build the game.

Using the “Add AI Perception Component” Blueprint node on Event Begin Play seems to work. But using that node, you cannot set the Detect Affiliations. So the AI still cannot perceive the player character