mostlyhuman
Member
I have this code following the documentation:
Is isAggressiveShared always needed as an intermediary like this or is there a way to just directly assign behaviorTree.GetVariable("isAggressive") to isAggressive and get rid of isAggressiveShared altogether? Thanks in advance!
Code:
bool isAggressive;
SharedBool isAggressiveShared;
void Start()
{
behaviorTree = GetComponent<BehaviorDesigner.Runtime.BehaviorTree>();
isAggressiveShared = (SharedBool)behaviorTree.GetVariable("isAggressive");
isAggressive = isAggressiveShared.Value;
}