public void Start()
        {
            NavmeshCut.OnDestroyCallback += HandleOnDestroyCallback;

            if (handler == null)
            {
                if (AstarPath.active == null || AstarPath.active.astarData.recastGraph == null)
                {
                    Debug.LogWarning("No AstarPath object in the scene or no RecastGraph on that AstarPath object");
                }

                var graph = AstarPath.active.astarData.recastGraph;
                handler = new MyTileHandler(graph);
                handler.CreateTileTypesFromGraph();
            }
        }
        private void CreateHandlers(List <NavmeshCut> cuts)
        {
            if (this.handler != null)
            {
                return;
            }
            AstarPath active = AstarPath.active;

            if (active == null || active.astarData == null || active.astarData.recastGraph == null)
            {
                return;
            }
            if (active.astarData == null)
            {
                active.astarData        = new AstarData();
                active.astarData.graphs = new NavGraph[]
                {
                    active.astarData.recastGraph
                };
            }
            handler = new MyTileHandler(active.astarData.recastGraph);
            handler.CreateTileTypesFromGraph();
        }