GetNearest In GraphUpdate

Hi
Here is a bug: when GridGraphUpdateRegion,use GetNearest can’t get accurate answer.
This is the timing:
GridGraphUpdateRegion → GridGraph.UpdateTransform → GetNearest → GridGraph.UpdateNodes
Due to async, In GetNearest get graph.transform is new transform, use graph.nodes is old.
So get the graphNode is error.

Hi

Do you have some code to reproduce the issue?

I use ProceduralGridMover update grid graph.
GetNearest can get accurate answer when i close ProceduralGridMover.
The picture bug happen, I see ProceduralGridMover.updatingGraph is true.
So I think GetNearest.graph.transform.InverseTransform(position) is error, the graphTransform is new but graph.nodes is old.

Hi

Are you using the latest version of the package?
If you, have you tried upgrading. I think this has already been fixed.

Do you remember which version?
I want to see code.

No idea of which exact version, I’m afraid. The ProceduralGraphMover was rewritten for version 5.

Where can I see different new feature version 4 to version 5?
I am considering whether an upgrade is necessary.

Hi there, you can see the updates made in Version 5 here in this blog post, or read about the individual changes here in the changelog

2 Likes