4.3.48 - Bug with GraphUpdateScene and modifing tags

I have a GraphUpdateScene with modifyTag = true and setTag = 2.

When calling GraphUpdateScene.Apply() it does correctly triggers an update, but the tag is not calculated for the nodes. If while visually debugging, I do a Scan on the Pathfinder object, it will correctly identify set the tag for the nodes impacted by the GraphUpdateScene object.

This has worked fine in 4.2.17 and earlier versions.

My apologies, I’ve been debugging this trying to find the source of the problem, and it’s a bit more complicated than I initially stated.

The GraphUpdateScene.Apply is working for that GraphUpdateScene object, correctly setting the tag.

The problem is GraphUpdateScene.Apply and AstarPath.UpdateGraphs don’t seem to apply/use neighboring GraphUpdateScenes.

So for example: Say I have a path in one spot (which uses GraphUpdateScene to set the tag for the area), and run GraphUpdateScene.Apply for it, it correctly sets the path. Then, right next to it I have another path with it’s own GraphUpdateScene. When I run that Apply, when it updates the adjacent nodes that overlap the first path, it’s then removing the tag from those nodes. The same thing happens If I do a GraphUpdateObject.scan near or overlapping those nodes.

If I replace my targeted GraphUpdateScene.Apply and mAstarPath.UpdateGraphs(guo) with a simple AstarPath.Scan, the tags are always correct for nodes. Clearly that isn’t a valid choice for efficiency purposes.

Does this make sense? I can elaborate more if needed.

Any thoughts on this Aron? Any workaround you can think of?

With 4.2.17 causing 5-10% of my player base to hang on 2021LTS, and the beta version having this issue, I’m completely stuck and at a complete standstill from getting this patch completed and pushed out to my players.


If you just want to set the tag, you probably want to disable the default behavior of the GraphUpdateScene to recalculate the given bounding box from scratch. Try to set ‘update physics’ to false.

That will work for when I’m just doing a GraphUpdateScene.Apply.

There are far frequent times where I’m doing a AstarPath.UpdateGraphs(guo), where I won’t want to destroy the correct tags on adjacent nodes. But as a work around, after doing a AstarPath.UpdateGraphs, I can find any adjacent GraphUpdateScene and then trigger them to re-apply. Not ideal, and wasn’t required in 4.2.17, but it allows me to keep moving forward. Thanks for the idea.

On a totally unrelated note: I just wanted to say how impressed I am with your a*pp! I was using Unity navmesh for 95% of my time pre-early access release. There were more and more absolutely game breaking issues I was running into as my testers started pushing the extremes of my game. 2 weeks prior to EA release, it was clear enough that I couldn’t go live with Unity’s NavMesh. So I stripped out the use of navmesh and replaced it with your solution. Very stressful for such a large change right before release. It ended up being totally the correct move. I had eliminated any game breaking issues and it has worked very well. Thank you for making this, I’m not sure what I would have done if it was not an option.

With the upgrade to Unity 2021 and your RVO code hanging on 5-10% of my player base, that introduced a pretty major game breaking issue. While I was able to roll back the patch within a day and 1/2, I had some bad reviews posted, and some angry players. I just got an update from the Unity staff that was looking into the issue, their computers were not in the population effected so they can’t look into if further. You may want to look into “releasing” your beta version has the existing version has such a large issue.

1 Like