iTween nodes bug PLEASE HELP!

Hello human beings!

Im trying to generate more nodes and assign them to my players current position using iTween.
But i have a bug that the nodes arn’t being added/created and assigned if the iTweenPath object is not being viewed in the inspector during run time!

Please help me because it’s really important for my game for it to work.

CODE (IDK if even needed):

//Happens every 0.25 seconds.
if(timePassed != 0){
walkingPath.nodeCount = (int)(timePassed / recordingDistance) + 1;
walkingPath.nodes [walkingPath.nodeCount - 1] = player.transform.position;
}
timePassed += recordingDistance;

Thank you for every help you can give.
Ethan

For everyone who will get this error:

There is an iTweenPathEditor script in which it changes the length of the list based on the nodeCount.
You should copy the for loop from that script to where you change the nodeCount.

if(walkingPath.nodeCount > walkingPath.nodes.Count){
					for (int i = 0; i < walkingPath.nodeCount - walkingPath.nodes.Count; i++) {
						walkingPath.nodes.Add(Vector3.zero);	
					}
				}

Like so