/// <summary> /// Use this for initialization. /// </summary> private void Start() { grid = FindObjectOfType <PathGridManager>(); if (grid == null) { Debug.LogError("Could not find a PathGridManager in the scene."); } else { // Gets the total number of nodes in the grid totalNodes = grid.GetGridSize().x *grid.GetGridSize().y; } }