Hi Aron.
I’ve recently updated all our codebase with 3.8.5b. We have all our graphs cached, so I didn’t notice this issue popping up until I just made a new graph in our test sandbox. We have a few places where NodeLink2 are used and after creating this new graph, I get this error:
Caught exception while deserializing data.
System.Exception: Tried to deserialize a NodeLink2 reference, but the link could not be found in the scene.
If a NodeLink2 is included in serialized graph data, the same NodeLink2 component must be present in the scene when loading the graph data.
at Pathfinding.NodeLink2.DeserializeReferences (Pathfinding.Serialization.GraphSerializationContext ctx) [0x00137] in C:\Dev\DivideUnity5\Assets\AstarPathfindingProject\Core\Misc\NodeLink2.cs:336
at Pathfinding.Serialization.AstarSerializer.DeserializeNodeLinks (Pathfinding.GraphNode[] int2Node) [0x0002e] in C:\Dev\DivideUnity5\Assets\AstarPathfindingProject\Core\Serialization\JsonSerializer.cs:712
at Pathfinding.Serialization.AstarSerializer.DeserializeExtraInfo () [0x00077] in C:\Dev\DivideUnity5\Assets\AstarPathfindingProject\Core\Serialization\JsonSerializer.cs:701
at Pathfinding.AstarData.DeserializeGraphsPartAdditive (Pathfinding.Serialization.AstarSerializer sr) [0x00047] in C:\Dev\DivideUnity5\Assets\AstarPathfindingProject\Core\AstarData.cs:333
at Pathfinding.AstarData.DeserializeGraphsAdditive (System.Byte[] bytes) [0x00023] in C:\Dev\DivideUnity5\Assets\AstarPathfindingProject\Core\AstarData.cs:287
UnityEngine.Debug:LogError(Object)
Pathfinding.AstarData:DeserializeGraphsAdditive(Byte[]) (at Assets/AstarPathfindingProject/Core/AstarData.cs:298)
Pathfinding.AstarData:DeserializeGraphs(Byte[]) (at Assets/AstarPathfindingProject/Core/AstarData.cs:272)
Pathfinding.AstarData:LoadFromCache() (at Assets/AstarPathfindingProject/Core/AstarData.cs:192)
I read in another thread that you changed the code to allow for serializations of links, but there seems to be an issue. The NodeLink2 objects are in the scene, they are marked as one way, with end transform being set on an empty transform (without a NodeLink2 component, as it is a one way).
I’m not sure why this error happens, or what exactly i’m doing wrong.