Tilemaps

Download

Unity Cheat Sheet: #33

Abhishek Smith

Abhishek Smith

Building Outscal | Land Jobs in the gaming industry | EA, Epic Games, TCS, | CMU, IIT K

Tilemaps are Unity's grid-based level building system. They control how tiles are placed, rendered, and interact in your 2D games.


Core Systems:


Tile Placement & Management

  • SetTile: Place individual tiles
  • SetTilesBlock: Place multiple tiles
  • SwapTile: Replace all instances
  • GetTile: Query tile at position

Rendering Control

  • SortOrder: Layer drawing order
  • ChunkSize: Performance optimization
  • DetectChunkCulling: View-based optimization
  • MaskInteraction: Sprite mask handling

Collision System

  • TilemapCollider2D: Physics interaction
  • UsedByComposite: Combine multiple colliders
  • ExtrusionFactor: Collision depth
  • IsTrigger: Collision vs trigger behavior

Grid System

  • CellSize: Base unit size
  • CellGap: Spacing between tiles
  • CellLayout: Grid arrangement type
  • WorldToCell/CellToWorld: Position conversion

Optimization

  • CompressBounds: Remove empty space
  • RefreshAllTiles: Update tile states
  • ResizeBounds: Adjust tilemap size

Show More