First, thanks for any help here - I’m reluctant to ask because it’s probably something obvious I’m missing but i’ve been looking at it too long…
The scenario is I have a holder object with a pathfinding script (working fine) and an event-based assignment script.
The objects being assigned are a group of instantiated prefab characters with a script added that navigates the path calculated from the pathfinding script when assigned from the assignment script.
If they all follow the same exact path, it’s working great.
What I am trying to do is append a unique “final location” for each prefab. Think of a bridge crew running on to the bridge then breaking up to battle stations.
Here is the simplified assignment script:
`public List RunPath; //populated by the pathfinding script
public bool ExecutePath;//set by the pathfinding script once the entire path is calculated
public GameObject CharacterArray;
void Start ()
{
%|-147361493_1|%
%|-950286578_2|%
}
void Update ()
{
%|1226425402_3|%
%|737211570_4|%
%|-481316925_5|%
%|1764865785_6|%
%|177424711_7|%
%|882064304_8|%
%|306964567_9|%
%|-1581774797_10|%
%|-958725657_11|%
%|-1565622815_12|%
%|-1720740372_13|%
%|130943564_14|%
%|-98425953_15|%
}
`
The issue is every prefab has a public List Path; variable and every prefab is getting every vector3 added to Path from CharacterFinalPositions[intClassCount]) which is the List of unique final positions. In other words, each prefab should get just one but instead, each prefab is getting them all.
Thanks again for any advice.