Custom Properties for Importing

../_images/custom-prop-ignore.png

You can customize how some portions of your Tiled files are imported into Unity prefabs through special custom properties. These custom properties always have a unity: prefix so that they do not collide with your own custom properties.

Property Name Value Type Used On Purpose
unity:ignore string Layers

Portions of the Tiled layer can be ignored during the import process. This is useful if you tiles to appear for a layer but not the colliders, for instance.

Acceptable values:
  • False: The layer is imported in full (default)
  • True: The layer is fully ignored (same result as having the layer invisible in Tiled)
  • Visual: The tiles are not imported for the layer.
  • Collision: The colliders are not imported for the layer.
unity:IsTrigger bool Layers, Tileset, Tile, Collider, Collider Group Controls the isTrigger setting of the Collider2D object generated in the prefab. Add as a layer custom property to override all colliders for a given layer.
unity:layer string Layers, Tileset, Tile, Collider, Collider Group Controls which Unity phyisics layer our generated colliders are assigned. The layer name must exist in your project’s Tag Manager.
unity:SortingLayer string Layers, Tile Objects Controls which sorting layer is assigned to the Unity Renderer component created for your tilemaps and sprites. The sorting layer name must exist in your project’s Tag Manager.
unity:SortingOrder int Layers, Tile Objects Controls which sorting order is applied to the Unity Renderer component created for your tilemaps and sprites.
unity:Tag string Layers, Objects Controls which tag is applied to the GameObject created for your layers and objects. The tag must exist in your project’s Tag Manager.