mostlyhuman
Member
I have a list in an external script that I need to initially copy to a behaviorTree shared list variable on Start, and then keep them in sync if something from the list changes during runtime in the external script. It would be one directional from the external list to the BT shared list. I know normally you set values on BT shared variables like this behaviorTree.SetVariable("AttackEvents", (SharedAttackEvents)attackEventNew); but how would I do basically like a foreach or iterate through it to populate it with values from a corresponding list in an external script or is there another way to achieve keeping these lists in sync as the list in the external script changes over time? Thank you for any help!