List not storing objects

So right now Im having a event that when triggered, should add that collided object into a List of the object holding the trigger. However, later when i call a function to try and use this List its saying my list.count is 0. really confused why this is happening, please help.

//PathNode Class

public List<GameObject> linkedNodes;
void Start () 
{
    linkedNodes = new List<GameObject>();
}
public void setMoverStart()
{
         Debug.Log(this.linkedNodes.Count);//Gives me 0

}
public void OnTriggerEnter(Collider col)
{
    if (col.gameObject.tag == "NODE")
    {
        if (col.gameObject != null)
        {
            this.linkedNodes.Add(col.gameObject);
        }
    }
    
}

// AIGen Class

private GameObject spawnNode;
void Update()
{        
    spawnNode.GetComponent<PathNode>().setMoverStart();
}

You should allocate memory for your list:

public void Awake() {
    linkedNodes = new List<GameObject>();
}

Instead of

Debug.Log(this.linkedNodes.Count);

use

Debug.Log(linkedNodes.Count);

.In AIGen class try something like:

private GameObject spawnNode;
provate PathNode pathNode;

void Awake()
{
    pathNode = spawnNode.GetComponent<PathNode>();
}

void Update()
{        
    pathNode.setMoverStart();
}

If it will not help, give me more lines of your code. And don’t use GetComponent<>() in update function, if will reduce your FPS.