Argument Out of Range On a List

Hi, I am making my own pathfinding solution to fit my game and so far it works but I just added a new function in my code and my List is not being properly adjusted.
Here is the code:

void findPathOfSplitNodes() 
    {
        splitNodesPath = new List<List<GameObject>>();

        //We find the path starting at each split node and then save that path in a list
        for(int i = 0; i < allSplitNodes.Count; i++)
        {
            splitNodesPath *= new List<GameObject>();*

splitNodesPath.Add(goThroughPath(allSplitNodes[0]));
}
}
The problem is with splitNodesPath _= goThroughPath(allSplitNodes*);*
Thanks for the help!_

It doesn’t look like you have given splitNodesPath a size. Does changing line 8 to the following still cause and error?

splitNodesPath *= new List<GameObject>();*

If so try changing your code to
splitNodesPath.Add(goThroughPath(allSplitNodes*));*

Hi, I have a question. Why did you initiate i-th entry of splitNodesPath in the for loop again? You have initiated splitNodesPath before the for loop. Maybe you can delete

splitNodesPath *= new List<GameObject>();*

Probably your goThroughPath(allSplitNodes_) is add to the (i+1)-th entry? Or you can check i-th entry of splitNodesPath with Debug.Log to print it._