Hello Guest

Author Topic: Empty Tile (tilemap)  (Read 4015 times)

TinSleeves

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 18
    • View Profile
Empty Tile (tilemap)
« on: April 15, 2013, 05:52:19 pm »
Hi,
I have blank tiles in my tilemap, however I seem to have a small square appear in these tiles even though there definitely is nothing in the texture.



These squares don't appear when you first set up a tilemap with the default blank tile, its only when using my blank tile.
Any idea what's causing this and is there a way to just add a blank tile without having one in the texture?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Empty Tile (tilemap)
« Reply #1 on: April 15, 2013, 10:59:38 pm »
That is because you're assigning an empty tile (i.e. a tile with no data in it) as opposed to "no tile".
You can assign no tile in code by assigning spriteId of -1, or in the tilemap editor, clear a tile by command+click on mac, ctrl+click on pc.

In that case there will be no tile created.
There will be an optimization for physically empty tiles like yours in a later version, but that is rather low priority as there is a usable alternative to it right now.

TinSleeves

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Empty Tile (tilemap)
« Reply #2 on: April 17, 2013, 10:23:37 am »
Awesome, thanks for the reply
I didn't know about ctrl+click, that solved my problem (and given me a spare tile in my tile map ;))