I have some enemy characters with AI placed in my level. They operate perfectly fine when playing. If the player does something, I want to spawn more enemies. All of them use the same AIController.
however, when I attempt to spawn in the same character_BP, I get a crash.
GetBlackboardComponent()->SetValueAsVector is causing the crash, so I assume it’s a nullptr between the AIBehavior tree and the blackboard.(?)
Am I missing another step that needs to be done when spawning a Character \ AI ?
Why would this not be a problem with the placed actors?
I’m not specifically spawning the blackboard component in c++.
In the character blueprint I set the AIBehavior I want the character to run, the behavior tree contains the link to the blackboard comp…which I thought SHOULD work, and does work just not for spawned enemies.
The header just has a the BT declared like this.
private:
UPROPERTY(EditAnywhere)
class UBehaviorTree* AIBehavior;