hi,
iām looking for a piece of documentation that explains how , if it is possible, to use a texture to generate a graph.
a piece of code in unityscript/javascript will be very, very ,very appreciated
thanks a lot ,
Dan (using pro version)
Hi
The Grid Graph has a small setting under Extras (at the bottom), if you expand it, you can check the option for Use Texture. Best is to first generate a reference texture first to get a better hang of what relates to what in the graph. Then you can use the texture to set which nodes should be walkable, not walkable etc.
If you want to assign a texture during runtime, you can assign it using
AstarPath.active.astarData.gridGraph.textureData.source = myTexture;
Note that you will need to scan the graph after assigning a new texture if you are doing it during runtime. Use AstarPath.active.Scan () for that.