Hello Guest

Author Topic: Problem with tk2dTileMap during build  (Read 3542 times)

Gluklichman

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Problem with tk2dTileMap during build
« 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?


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Problem with tk2dTileMap during build
« Reply #1 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.

Gluklichman

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Problem with tk2dTileMap during build
« Reply #2 on: August 25, 2013, 12:52:45 pm »
Thanks for your help. Now everything is good.