When i spawn a AI in second time,the controller seems dont work

i create a simple ai with BP,AI has character,controller,behavior tree.Everything works well.but when i spawn this ai with “spawn actor from class” or “spawnai from class”,something weird happened.the First Time after AI spawned,AI work well.but the second time,AI didnt work anymore.wo have checked everything about AI.I found every variable is empty in AI’s controller BT,which controller spawned in second time.
the difference between using “spawn actor from class” and "spawnai from class is that when i used “spawn actor from class”,ai didnt work(cant move),when i used “spawnai from class”,ai can work(can move).but the controller is also something wrong however i spawn ai.

Help!!!

Could you show a screenshot of your AI setup?

The first thing I am thinking of that might be the problem, is do you start your Behaviour tree when you spawn the AI?

i start run behaviour tree in ai controller,but maybe i found where the problem is.the type of a variable in blackboard is wrong.i have fixed it.but i dont test it yet.if the problem also happened,i will post a screenshot.
thanks for reply!thanks!