4.2.15 totally broken for me

Fresh download and import and following tutorial gives this error.

NullReferenceException: Object reference not set to an instance of an object
Pathfinding.NavmeshUpdates.Update () (at Assets/_ThirdParty/AstarPathfindingProject/Navmesh/NavmeshUpdates.cs:166)
AstarPath.Update () (at Assets/_ThirdParty/AstarPathfindingProject/Core/AstarPath.cs:859)

Thought it was me, all of the examples have this as well. Astarpath.active is null. How is this possible if NavmeshUpdates.cs:166 is called from Astarpath.cs?

Just tried to go up to the Beta 4.3.47 pro, which doesn’t throw these errors, and works on play. However, there’s no display of any graphs in the editor. Grid, NavMesh, nothing. Worried there’s other QoL issues hidden within, I’ve downgraded again and will wait to hear why this error is throwing and nothing is working.

Hi

Do the errors for 4.2.15 happen even in a blank project?

Good question, no, in a blank URP project it’s fine.

Hopefully that is a clue. I can’t fathom this, because remarkably, the update that is throwing null ref is called by AstarPath. Just on a OOP level I don’t understand this.

Oh and mind you, this error is happening in blank scenes in my main project. There’s nothing but a plane, an AI, and pathfinder and it throws this. Something in project settings maybe? Don’t want to throw red herrings.

Hi

What is your setting for “Enter Play Mode Mode” in the Unity project settings? This package requires Reload Scene to be enabled. 4.2 doesn’t yet have a warning about this (the beta version already has one).

That solved it. I am sorry that seems like something I missed in the docs.

Ah. Great.
It actually doesn’t exist in the 4.2.x docs because Unity handn’t made the change that broke this behavior at the time when 4.2.x was released. I’m going to backport the fixes I’ve made to it from the beta soon, which will hopefully reduce the confusing around it a lot. Sorry about that.

No worries, thank you for the AWESOME support so far.

1 Like