[4.3.40] [Bug] GridGraphRule bug and some questions

1. (Bug) I created a “GridGraphRule” from the example in the documentation, but nothing has changed on the grid. Found the issue in “GridGraphRules” in the “ForEachNode” function on line 281:
“nodeNormals[i] != 0”, but nodeNormals is float4(0,1,0,0) and apparently it does not work properly

2. What could be the problem with having a 2048 by 2048 grid in a cell size of 1? I removed the restriction and did not see any problems at such sizes, everything seems to be working well.

3. HierarchicalGraph works on GridGraph? How i can visual debug it?

4. Сan i change the number of nodes in a single connected component somewhere?
Because I want to increase the maximum graph size to 2048x2048x1 and possibly increasing / decreasing the size of the connected component in the HierarchicalGraph can have a good effect on performance when changes in the graph

5. When will 4.3.40 be out of beta? All changes I make to the code are updated via scoped registred, i.e. I cannot change anything in the code. And if you just copy the folder from Packages to Assets and delete the scoped registred, then errors appear

Thanks! Yes, that should indeed be using math.any instead of math.all.

  1. Mostly memory usage to avoid users shooting themselves in the foot. The 1024 limit is only artificial because the graphs start to use a lot at that size.

  2. You can visualize it using A* Inspector -> Settings -> Graph Coloring = Hierarchical Node.

  3. You will have to edit the HierarchicalGraph.cs script and edit the MaxChildrenPerNode and MinChildrenPerNode constants.

  4. As long as it needs to depend on Unity’s preview packages (burst, collections etc.) it will have to stay in beta I’m afraid.
    You can probably get rid of those errors if you install the dependencies manually (see the package.json file).

1 Like