How do I get AI controlled characters to stream in..?

Hello,

I am new to Unreal and am trying to put together a framework to build a larger game project in and I have gotten myself to a place where I am not sure what the next steps are.

I am streaming in levels using the LoadStreamLevel node in a Blueprint Actor that has a collision box component. Pretty straightforward stuff.

All of my levels stream in fine, but the various bots that I have in the levels seem to be disconnect from their Controllers and Behaviour Trees. All of the bots are child class objects for the class (AIC_WBGNPCs) that I am calling in the Blueprints.

I am trying to manually load the Controllers and Trees in the SubLevel Blueprint, and in the Loader. I am doing both because I am trying to load all of this after the SubLevel has finished streaming in and I am not confident as to when that is.

(I guess I am a Pants and Suspenders kind of guy. I can clean it up after I get one of them to catch.)

I can see the messaging in the PrintString, so I know that we are getting to that part of the blueprint. It looks like the one getting fired by the Loader is the one that is firing at the right time, but that does not matter if the controllers and the Behaviour tree are still not loading. I just don’t know what the next thing I ought to be looking at is.

I have also bound a OnLevelLoaded event to the BeginPlay event in the level. This event is never gotten to at all and I am not sure why, but that might be outside of the scope of the core “Why are my AIs not loading their Brains?” inquiry.

I have tested these bots in persistent, non-streaming loads and they work fine, so I don’t think that the bots themselves are the problem.

Any does anyone have any insight that might help me to get these bots working when streaming?



Having the same issue without a solution till now. Something seems to mess up the Blackboard

Ok I actually found a fix that works for me. It is a bit hacky tho:
I added a “wait until next tick” at the beginning of the On Begin Play Event in the related AI Controller Blueprint. My guess is that this fixes the loading order to be correct again.