I’m trying to define some spawn points for various AI actors to come in and populate my scene. The space the AI is spawning in is a Blueprint deriving from Static Mesh Actor that defines the “building”, with child static mesh components for all the props within the building (lights, chairs, etc.).
The building will be procedurally placed at runtime, and the goal is to have AI that “fit” the building wandering around nearby. For example, a landfill will have garbage trucks and garbage workers, a newspaper office will have an editor running around yelling at journalists, and an army base would have guards and soldiers on patrol.
I have an ActorComponent that is serving as a sort of “metadata” component regarding what AI will spawn inside the building, and I’ve been defining what “types” of AI to spawn via an array of structs containing essential information about the AI (the Behavior Tree to use, the class of AIController to spawn, etc.).
However, while I can select stuff from the Content Browser to populate this struct, I can’t select anything that is parented to my Blueprint. My goal is to have predefined SceneComponents that will serve as spawn points for the AI, which would allow AI to be spawned in the same place relative to the building no matter where the building winds up being placed in the world. As it stands, however, I can’t specify any kind of value for that field from the editor itself.
I’ve been doing it “manually” by giving each struct a spawn point from the Blueprint’s constructor, but this is less than ideal since it adds an extra step that doesn’t need to be there. Is this the only way to handle it, or is there a way to assign child components of a Blueprint to variables in the editor?