How do you share GameObjectList or SharedGameObject[]

bbjones

Member
For example in the LeaderFollow task, there is a public SharedGameObject[] Agents.

But in the inspector you can't assign a shared variable to the array, you can only input a value for array size then you can assign individual array elements.1684028616449.png
1684028642849.png

In my case my array of agents will change at runtime, so I need to assign and/or change the list of agents over time.
For now I'm just writing my own task to handle things.
 
Each element within the LeaderFollow task is a SharedVariable, and not a List<SharedGameObject>. For your use case you will need to modify the task.
 
Top