Problem with build for PC

Hello!

In editor play mode all works great.
But when i build standalone PC (il2cpp, Unity 2018.3.12)
it stop works with errors like this:

InvalidOperationException: Trying to initialize an already initialized object. Pathfinding.RecastGraph
at Pathfinding.RichFunnel.Initialize (Pathfinding.RichPath path, Pathfinding.NavmeshBase graph) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.RichPath.Initialize (Pathfinding.Seeker seeker, Pathfinding.Path path, System.Boolean mergePartEndpoints, System.Boolean simplificationMode) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.RichAI.OnPathComplete (Pathfinding.Path p) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.Seeker.OnPathComplete (Pathfinding.Path p, System.Boolean runModifiers, System.Boolean sendCallbacks) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.Seeker.OnPathComplete (Pathfinding.Path path) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.PathReturnQueue.ReturnPaths (System.Boolean timeSlice) [0x00000] in <00000000000000000000000000000000>:0

Another error:
NullReferenceException: Object reference not set to an instance of an object.
at Pathfinding.Util.ObjectPool`1[T].Release (T& obj) [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.NavmeshBase.OnDestroy () [0x00000] in <00000000000000000000000000000000>:0
at Pathfinding.AstarData.ClearGraphs () [0x00000] in <00000000000000000000000000000000>:0
at AstarPath.OnDestroy () [0x00000] in <00000000000000000000000000000000>:0

Also sometimes after start it works for 1 path (few creatures calculates path and normally follow path, but after completion path errors appears)

Any suggestion?

Hi

Which version are you using? There have been some fixes for il2cpp in recent updates. You can download the latest version here: https://www.arongranberg.com/astar/download

I use version from asset store.
Now i use latest version. Seems this bug fixed already!
Thanks!

1 Like