Hello Guest

Author Topic: 2D Toolkit 2.2.2  (Read 26727 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.2.2
« Reply #15 on: October 17, 2013, 05:21:38 pm »
tk2dUICamera issues... Cannot click a button viewed by a perspective camera with a tk2dUICamera script on it,  When an ortho camera has a tk2dUIcamera on it.

Unity 4.2.2f1
working before tk2d 2.2.2 final, Any thoughts? my brain hurts from this. tried the 3dui demo in a fresh load.

That is an embarrassingly bad typo bug :( I apologise for the inconvenience, I should have spotted it sooner. I will upload a patch (2.2.3) for this tomorrow.
To patch it in right now:

tk2dUIManager (line 655 or thereabouts), replace:
Code: [Select]
            tk2dUICamera currCamera = sortedCameras[0];
with
Code: [Select]
            tk2dUICamera currCamera = sortedCameras[i];

EDIT: 2.2.3 is out now
« Last Edit: October 17, 2013, 05:39:19 pm by unikronsoftware »

iamagiantnerd

  • Guest
Re: 2D Toolkit 2.2.2
« Reply #16 on: October 19, 2013, 05:07:25 am »
This is all fixed now with 2.2.3! Thanks for the quick response!

The tile map is programmatically generated. When a new map was loaded, I was destroying the render data and re-creating it before setting the tiles in the different layers.  Maybe something is has changed in the way I should do this. Basically, I was doing the following:

Code: [Select]
// map is tk2dTileMap
DestroyImmediate(map.renderData);
map.renderData = null;
map.Layers = null;
tk2dRuntime.TileMap.BuilderUtil.InitDataStore(map);

// loop though the map and create the tiles
..looping code...
map.Layers[0].SetTile(x,y,tile);
map.Layers[1].SetTile(x,y,tile2);
map.Layers[2].SetTile(x,y,tile3);
map.Layers[3].SetTile(x,y,tile4);
..end loop

map.Build();


When I don't destroy the render data and re-create it, I get pre-fabs left over from the previous map.

Basically, I need to reset the map to be "empty" again, including prefabs, and then re-populate it.  Maybe there's a better/different way to accomplish this.