Create an entity tile
Entity tiles are alternate versions of built-in tiles that improve performance by optimizing how Unity stores and fetches tile data. Entity tiles store tile data in native memory instead of managed memory, so Unity can use the following:
- The Burst compiler to compile faster code.
- The Job system to get data for multiple tiles simultaneously across multiple CPU cores.
Note
You can't mix entity tiles and normal tiles. If you do, entity tiles fall back to not using the Job system or the Burst compiler.
The following built-in tiles have entity versions:
- Tiles that Unity creates automatically when you drag a sprite into the Tile Palette window
- Animated tiles
- Auto tiles
- Rule tiles
Create entity tiles by default
To create entity tiles by default when you drag a sprite into the Tile Palette window, follow these steps:
- From the main menu, select Edit > Preferences to open the Preferences window.
- Select 2D > Tile Palette.
- Set Create Tile Method to DefaultEntityIdTile.
Create an entity tile
To create an entity version of a built-in tile, follow these steps:
- From the main menu, select Assets > Create > 2D > Tiles.
- Select the entity version of the tile you want to create. For example, select Isometric Rule Entity Id Tile for the entity version of the isometric rule tile.
You can also create a custom entity tile.
Convert existing tiles to entity tiles
To convert existing tiles to entity tiles, use the Tile Asset Converter window. Tile palettes continue to work with the converted tiles.
- From the main menu, select Window > 2D > Tile Asset Converter to open the Tile Asset Converter window.
- Select Convert Unity Tiles.
Unity converts the following:
- Tiles to Entity Id tiles
- Animated tiles to Animated Entity Id tiles
- Rule tiles to Rule Entity Id tiles
- Auto tiles to Auto Entity Id tiles