NullReferenceException

I’m sure I’m missing something pretty obvious, but I was following the get started guide, have the basic grid map setup, made a capsule, attached a character controller, a seeker, and the script to it. When I try to run I get “NullReferenceException: Object reference not set to an instance of an object
AI_Movement.Start () (at Assets/Scripts/AI_Movement.cs:15)”
on the line calling the seeker. Stepping through, as it goes, everything has a definition, but it breaks halfway through that line.
Here’s the code:


using UnityEngine;
using System.Collections;

using Pathfinding;

public class AI_Movement : MonoBehaviour {
	
public Vector3 targetPosition;
public void Start () {

		
Seeker seeker = GetComponent<Seeker>();
		
//Start a new path to the targetPosition, return the result to the OnPathComplete function
(line 15)seeker.StartPath (transform.position,targetPosition, OnPathComplete);
}
public void OnPathComplete (Path p) {
Debug.Log ("Yey, we got a path back. Did it have an error? "+p.error);
}
}

Um.
Seeker seeker = GetComponent<Seeker> ();
Sure there is a Seeker attached to the object? Since that is basically the only thing which could cause a NullRef there.

Not sure what happened to the part when I pasted it here.
Yeah, apparently when I was trying to figure out my current problem, I forgot to re-add the seeker. Sorry about that.

But my original problem was, it seems like it’s going through the code, but no green line shows up, nor does the capsule move. I’m sure it’s some other similarly silly thing I’ve missed.

The green line should show up if you are requesting a path and the seeker has Draw Gizmos enabled. But I would need to see the full code to help you more than that.