2D Toolkit Forum

2D Toolkit => Support => Topic started by: Gluklichman on August 25, 2013, 12:38:32 pm

Title: Problem with tk2dTileMap during build
Post by: Gluklichman on August 25, 2013, 12:38:32 pm
In my solution I use tk2dTileMap. To change parts of map during the game I use :

Code: [Select]
_tilemap.BeginEditMode();
//do something
_tilemap.EndEditMode();

While I`m in editor, everything is ok. But when i try to build my solution, building fails with error:
Quote
error CS1061: Type `tk2dTileMap' does not contain a definition for `BeginEditMode' and no extension method `BeginEditMode' of type `tk2dTileMap' could be found

Unity version: 4.0
tk2dVersion: 2.1

What is wrong?

Title: Re: Problem with tk2dTileMap during build
Post by: unikronsoftware on August 25, 2013, 12:42:11 pm
Why are you calling BeginEditMode? You don't need to.

Simply call tileMap.SetTile( xxx );
then tileMap.Build() to refresh the data.
Title: Re: Problem with tk2dTileMap during build
Post by: Gluklichman on August 25, 2013, 12:52:45 pm
Thanks for your help. Now everything is good.