Hello, I have a problem with my GridGraph, it seems that I cannot change the value of its Mask.
[SerializeField] private int maskIndex;
[Button]
public void ShowValue()
{
GridGraph gridGraph = AstarPath.active.data.gridGraph;
Debug.Log("Show graphe value : " + gridGraph.collision.mask.value);
gridGraph.collision.mask.value = 1 << maskIndex;
Debug.Log("Show graphe value : " + gridGraph.collision.mask.value);
}
my bad code
I use only one graph
result in the console on a graph change via my script
layers
changing mask in Pathfinder works perfectly at runtime, but has no influence on my scripts and vice versa as if I retrieved a clone or another graph in my script.
other than that I have no problems and everything works perfectly.