GetTileEntityId(Vector3Int)
Gets the EntityId of the Tile at the given xyz coordinates of a cell in the Tilemap.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Tilemaps
- Assembly: UnityEngine.TilemapModule
public EntityId GetTileEntityId(Vector3Int position)
Parameters
Returns
Examples
using UnityEngine;using UnityEngine.Tilemaps;public static class TilemapExample{ public static void GetTileEntityIdExample(Tilemap tilemap, Vector3Int position, Tile tile) { tilemap.SetTile(position, tile); var tileId = tilemap.GetTileEntityId(position); Debug.Log($"The ids for the Tile placed are equal ({(tileId == tile.GetEntityId()).ToString()})"); }}