public void AddForeground(Vector3Int position, IOverlay overlay) { if (overlayTiles.TryGetValue(position, out OverlayTile overlayTile)) { overlayTile.overlays.Add(overlay); UpdateOverlays(overlayTile.overlays); } else { overlayTiles.Add(position, new OverlayTile(overlay, backgroundTilemap.GetTile(position))); overlay.SetDisplay(true); //remove it from the tilemap backgroundTilemap.SetTile(position, null); } }