Every time I try to generate cache for LayerGridGraph (I am using the Inspector menu), I get this error
NullReferenceException: Object reference not set to an instance of an object Pathfinding.Serialization.AstarSerializer.SerializeNodeConnections (Int32 index) (at Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs:279) Pathfinding.Serialization.AstarSerializer.SerializeNodes () (at Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs:191) Pathfinding.AstarData.SerializeGraphsPart (Pathfinding.Serialization.AstarSerializer sr) (at Assets/AstarPathfindingProject/Core/AstarData.cs:283) Pathfinding.AstarData.SerializeGraphs (Pathfinding.Serialization.SerializeSettings settings, System.UInt32& checksum) (at Assets/AstarPathfindingProject/Core/AstarData.cs:267) Pathfinding.AstarData.SerializeGraphs (Pathfinding.Serialization.SerializeSettings settings) (at Assets/AstarPathfindingProject/Core/AstarData.cs:257) Pathfinding.AstarData.SaveCacheData (Pathfinding.Serialization.SerializeSettings settings) (at Assets/AstarPathfindingProject/Core/AstarData.cs:241) AstarPathEditor.DrawSerializationSettings () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:1544) AstarPathEditor.DrawMainArea () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:822) AstarPathEditor.OnInspectorGUI () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:426) UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/Inspector/InspectorWindow.cs:888) UnityEditor.InspectorWindow.OnGUI () (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/Inspector/InspectorWindow.cs:243) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
It seems like this bug was fixed in 3.2.5, and it actually works fine for GridGraph and LayerGridGraph with only 1 layer. However, in case LayerGridGraph spans multiple floors, that exception still occurs.
Is there any quick workaround for that? Everything is perfect except this caching issue…
Thanks for help.