Function GridGraph.AlignToTilemap

AlignToTilemap (UnityEngine.GridLayout grid)

Aligns this grid to a given tilemap or grid layout.

Public
void AlignToTilemap (

UnityEngine.GridLayout

grid

)

Aligns this grid to a given tilemap or grid layout.

This is very handy if your game uses a tilemap for rendering and you want to make sure the graph is laid out exactly the same. Matching grid parameters manually can be quite tricky in some cases.

The inspector will automatically show a button to align to a tilemap if one is detected in the scene. If no tilemap is detected, the button be hidden.