Resetting GameObjectList

WordsAndNumbers

New member
Hey folks,

Dumb question, but I'm stumped. How do you go about clearing a GameObjectList shared variable (filled by FindGameObjectsWithTag) when restarting a behavior? I had assumed "Reset Values on Restart" would reset the values when the behavior restarted. No luck.

If I set storeValue.Value to null in OnBehaviorRestart, it throws NullReference errors for several seconds before (sometimes) actually clearing the list and refilling it. At this point, I've pared everything down so the Find task is first and no external factors that would affect it are changing.
 
You could do something like:

Code:
storeValue.Value = new List<GameObject>();
 
Top