UpdateGraphs Async?

Hi, is it possible to do UpdateGraphs Async? When I call UpdateGraphs, there a few milliseconds of lag while the graphs update.

Hi

Grid graph updates have to happen in the main thread because it uses Unity physics. Currently there is no built in way to process the updates over multiple frames either unfortunately (unless you write your own work item, like has been done in the ProceduralGridMover script). How large is your graph (in nodes) and how large is the region that you are updating? It may be possible to speed it up in another way.

Hey, I’m not OP but I’ve noticed that graphUpdates take a few Miliseconds to update also. I think what I want to do (And perhaps what OP is needing) is somehow tell a block of code to ‘await’ the update and proceed once it is complete. The functionality I am looking for is similar to what you can do with an JavaScript Promise, though I’m not sure how to do that in C#. Can you shine a light on that? I get the feeling you’re more of a Javascript guy from some of your examples and responses but I was hoping you might also have an idea how to accomplish this in c#.

I wonder if this could not be optimized further.

It could help, allowing the method to specify the graph the Update should happen on. Possibly people only want one Graph to be updated, not all.
Maybe also now with the Job System and Burst, there could be improvements? A lot has happened in the last 4 years.