コード例 #1
0
        public PathfindingGrid Copy(Allocator allocator = Allocator.TempJob)
        {
            PathfindingGrid newGrid = this;

            newGrid.grid = new NativeArray <Node>(grid.Length, allocator);
            grid.CopyTo(newGrid.grid);
            return(newGrid);
        }
コード例 #2
0
        public void UpdateGrid(PathfindingGrid grid)
        {
            this.grid.Dispose();

            if (grid.nodeSize > 0)
            {
                this.grid = grid;
            }
        }