public PathfindingGrid Copy(Allocator allocator = Allocator.TempJob) { PathfindingGrid newGrid = this; newGrid.grid = new NativeArray <Node>(grid.Length, allocator); grid.CopyTo(newGrid.grid); return(newGrid); }
public void UpdateGrid(PathfindingGrid grid) { this.grid.Dispose(); if (grid.nodeSize > 0) { this.grid = grid; } }