private void SetWalls() { for (int i = 0; i < walls.Length; i++) { MapTile tile = MapWorld.GetMapTileAt(walls[i].x, walls[i].y); tile.traversable = false; tile.materialSurface = 2; MapWorld.SetTile(tile); } }
private void UpdateGroundTile(MapTile newTile) { float startTime = Time.realtimeSinceStartup; MapWorld.SetTile(newTile); Debug.Log("Time(SetTile): " + ((Time.realtimeSinceStartup - startTime) * 1000f)); UpdateGroundTilemap(newTile); Debug.Log("Time(UpdateTileMap): " + ((Time.realtimeSinceStartup - startTime) * 1000f)); PathNodesNA.Dispose(); SetPathNodes(); Debug.Log("Time(SetPathNodes): " + ((Time.realtimeSinceStartup - startTime) * 1000f)); }