I have problem with GridGraph, it only works half way. So at this page -
“Configure using script”
GridGraph is working with -
gg.nodeSize = 1; or
all fine, but when I try to change node width or depth, it does not change.
aka - this part of the code.
gg.width = 50;
gg.depth = 50;
Bounds bounds = new Bounds(transform.position, Vector3.zero);
foreach(Renderer r in GetComponentsInChildren())
AstarData data = GameObject.Find(“A*”).GetComponent().astarData;
GridGraph gg = data.gridGraph;
gg.center = bounds.center;
gg.width = (int)bounds.extents.x;
gg.depth = (int)bounds.extents.y; //It doesnt matter If I use this code or raw numbers. gridgraph does not change depth or width.
Does any one can spot whats the problem? Why GridGraph does not change width or depth? The width and depth node count does not change.
EDIT : Found my solution - > Unable to set gridgraph height and width from code