- Home /
How to get adjcent tiles (horizontal or vertical) in an isometric tilemap ?
I have ScriptableTile from Tilemap.GetTile(position). how to get the tiles that are adjacent either horizontally or vertically from the specified tile.
Answer by CoolTube_YT1234 · Sep 14, 2021 at 07:54 PM
I'm pretty new to unity but try doing something like this:
Pos = transform.position; if (TileBase.GetTile(WorldToCell(Pos + new Vector2(-1, 0))).name != null) { Debug.Log("There is a tile left of the current position."); }
Your answer
Follow this Question
Related Questions
How do I add neighbor rules for RuleTiles by script? 1 Answer
How do you get the tile on which a gameObject is standing on Isometric Tilemap ? 1 Answer
TileMap won't show up in 2d object in heirarchy. 0 Answers
Getting the Collider of a Tile 0 Answers
Removing tile on tilemap1 removes tile from tilemap2. How can i fix this? 0 Answers