using Godot; using System; using System.Linq; using Godot.Collections; public partial class TilemapAvoidance : TileMapLayer { [Export] private Array _solidLayers; public override bool _UseTileDataRuntimeUpdate(Vector2I coords) { // if (_solidLayer.GetUsedCellsById(0).Contains(coords)) // { // return true; // } return _solidLayers.Aggregate(false, (current, layer) => current | layer.GetUsedCellsById(0).Contains(coords)); } public override void _TileDataRuntimeUpdate(Vector2I coords, TileData tileData) { tileData.SetNavigationPolygon(0, null); } }