Why my Pawn class has no AIController?

I’ve created a new class that extends pawn and set to it a custom AIController, but both Get AIController and Get Controller return None. What did I do wrong?

It depends on how you spawn the Pawn. If you use SpawnAIFromClass this will be done for you, otherwise you need to manually call SpawnDefaultController.