2D Toolkit Forum
2D Toolkit => Support => Topic started by: TinSleeves 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.
(http://danielhaslop.co.uk/misc/screen2dtk.png)
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?
-
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.
-
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 ;))