Unity3d 5.0.1f1 + Astar Pathfinding 3.6 - save scene (and Astar config) problem

Hi all,

I have been working with no problems up to Unity3d 4.5 and previous pathfinding lib version.
Two weeks ago I updated to Unity3d 5.0.1f1 and yesterday to A pathfinding v3.6* because of some Windows phone build problems (not yet resolved, though… but that’s another story…).
Now, I realized that bots were not working as expected while performing some regression testings and actually it is.
So I checked the Astar pathfinding configuration and found that it had been actually modified somehow possibly due to the lib version upgrade.

Now, I cannot even save a scene anymore, since I have the following error :frowning:

ArgumentNullException: Argument cannot be null.
Parameter name: s

System.Text.Encoding.GetByteCount (System.String s) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Text/Encoding.cs:207)
System.Text.UTF8Encoding.GetByteCount (System.String chars) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:1045)
System.IO.BinaryWriter.Write (System.String value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/BinaryWriter.cs:281)
Pathfinding.Serialization.AstarSerializer.SerializeMeta () (at Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs:343)
Pathfinding.Serialization.AstarSerializer.CloseSerialize () (at Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs:253)
AstarPathEditor+c__AnonStorey1.<>m__1 (Boolean force) (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:2379)
AstarPath.ProcessWorkItems (Boolean force) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:981)

so, any modification on AStar grid config now won’t be saved (I am utilizing a grid graph).

Does anybody have an idea of the cause/solution?
Thanks all in advance for any precious help provided :slight_smile:

Best Regards,

I run into the same problem today.Using A Pathfinding 3.6 pro* and Unity3D 5.0.1f1.

  1. Create a new scene.
  2. Create a empty GameObject and attach a Pathfinder component.
  3. Add a Point Graph, then



I think have found a workaround, though :smile:
Since in my game I have many levels (scenes), everytime I have the same problem (so consider that it is really impacting on my dev).
I noticed that by default the astar pathfinding, after I create a grid and save, does create another 10x10 grid at (0,0,0). I used to delete it. Not anymore now. I just leave it there, scan grid, select any other object in the project hierarchy (not the A*) and save.

It seems to be working… (crossed fingers…)

I’m glad that you found a workaround… but that do not seem to work for me since it is a Point Graph…
When using Navmesh or Recast Graph, there are also errors.

OK, this is fixed in the beta version 3.6.2.

3.6.2 (2015-04-14)
Fixed null reference exception in the PointGraph OnDrawGizmos method.

1 Like


Just fixed this bug in the latest beta (released a few minutes ago). 3.6.5.
Thanks for reporting it.

PS: Regarding the windows phone build problems, have you read this page: A* Pathfinding Project: Deploying for mobile

Hi I have a problem with the version 3.4. the path finding doesn’t create grids under a tunnel for example.


Grid graphs are not multilayered. It will only generate a single layer of nodes. The pro version contains a multilayered grid graph and a recast graph which can also generate multilayered navmeshes.

You can use the Navmesh Graph to make a custom navmesh which is multilayered.