Example #1
0
    private void Rebuild2()
    {
        ListView <NavmeshCut> all      = NavmeshCut.GetAll();
        ListView <NavmeshCut> listView = new ListView <NavmeshCut>();

        this.CreateHandlers(all);
        if (this.handlers == null)
        {
            return;
        }
        AstarPath active = AstarPath.active;
        int       num    = active.astarData.graphs.Length + 1;

        for (int i = 0; i < all.Count; i++)
        {
            all[i].Check();
        }
        for (int j = 0; j < this.handlers.Length; j++)
        {
            listView.Clear();
            for (int k = 0; k < all.Count; k++)
            {
                NavmeshCut navmeshCut = all[k];
                if (navmeshCut.campIndex != j && navmeshCut.enabled)
                {
                    listView.Add(navmeshCut);
                }
            }
            this.handlers[j].ReloadTiles(listView);
            AstarData astarData = this.handlers[j].graph.astarData;
            astarData.RasterizeGraphNodes();
        }
        for (int l = 0; l < all.Count; l++)
        {
            if (all[l].RequiresUpdate())
            {
                all[l].NotifyUpdated();
            }
        }
        this.forcedReloadBounds.Clear();
    }