Undocumented breaking changes in RichSpecial and NodeLink2

I am facing problems upgrading from version 4 to version 5. Apparently, RichSpecial and NodeLink2 have changed quite a bit and the changes broke my link handling at various places. NodeLink2 no longer has a startNode and endNode, these seem to be gone completely and without replacement. The nodeLink field of RichSpecial is no longer a NodeLink2, but an OffMeshLinkTracer. This leads me to my questions:

  1. Why exactly are startNodes and endNodes arrays, what has changed here? Would I be safe to assume that startNodes[0] and endNodes[0] are what I am looking for (probably assuming that I have only one graph? Are the arrays guaranteed to be non-null and of length at least one?
  2. Are the first and second fake transforms in OffMeshLinkTracer equivalent to the StartTransform and EndTransform of the corresponding NodeLink2 (that I can no longer access via RichSpecial)?
  3. For proper handling, I need to check for components on the game object that has the NodeLink2 component. Is the gameObject linked by OffMeshLinkConcrete that one?
  4. If I translate a GraphNode to a NodeLink2, how do I get access to the startNode and endNode now? I do need the nodes, not just the transforms. Is there any way to get the corresponding OffMeshLinkConcrete via the `OffMeshLinkSource?

The upgrade guide should probably mentioned these changes, too. Thanks!

Alright, I have found the following solutions that appear to work after some basic testing.

  1. It looks like it works as assumed, I can get the first elements from those arrays.
  2. I figured I only needed the positions and switched to using start and end from the OffMeshLinkConcrete object.
  3. Indeed, the gameObject is the one I need, better yet, the component seems to give me the NodeLink2 component.
  4. After looking at the code, it turns out that the graph node is a LinkNode from which I can get the OffMeshLinkConcrete object.

Would be nice if these could be confirmed.

Hi

That’s a good point. This should be mentioned in the upgrade guide.

  1. I’m planning for allowing links to be wider than a single point. And thus they need to be able to connect multiple nodes to each other.
  2. Yes. But note that the order is based on which direction the agent traverses the link in.
  3. You can access this via the gameObject or component properties.
  4. Looks like you figured this out.