Hello Guest

Author Topic: 2D Toolkit 1.7 beta 3  (Read 9107 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
2D Toolkit 1.7 beta 3
« on: April 28, 2012, 12:21:27 am »
Loads of small fixes and updates. 1.70 is definitely the biggest update yet now!

TILEMAP: API functions changed, new function - GetTileAtPosition
TILEMAP: Tilemap editor layer UI tidied up slightly
TILEMAP: Local rotation and scale is retained on renderdata object
TILEMAP: Tile info, you can set up string / int / float values on each tile, and get this metadata at runtime
TILEMAP: Render data is now serializable. This will save each mesh independently, and the render data can be saved as a prefab and instanced in other scenes.
BUTTON: Now works with Time.timeScale = 0
BUTTON: Sprite names can be changed at runtime
ANIMATEDSPRITE: Max frame count is 400, and the selection popup is much nicer to use
ANIMATEDSPRITE: PlayFromFrame
BUGFIX: Brand new sprite collection selector - looks and functions identical to before. Works with runtime generated spritecollections, and will reindex when necessary. No need to delete tk2dIndex after merging from source control.
BUGFIX: Small sprite collection editor workflow improvements
BUGFIX: Setup for JS is a separate DLL assembly now. After installing, restart Unity (this is important) and run Setup for JS to move all files to correct locations for JS access. Much more robust than before.
STATIC SPRITE BATCHER: Now has local scale function.
STATIC SPRITE BATCHER: Support for multiple materials, they will be optimized correctly for minimum drawcalls

NOTE: If you are using JavaScript, don't forget you'll need to restart Unity after updating, and run "Setup For JavaScript" after Unity restarts to fix things.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.7 beta 3
« Reply #1 on: April 28, 2012, 12:34:29 am »
I should also mention that you can change tiles while the game is running -
tileMap.Layers[0].SetTile(x, y, spriteId);

At the end of the frame, call
tileMap.Build()
to build the relevant parts of the tilemap.

You should keep the partition size smaller (at the cost of draw calls) so the mesh gets updated quicker.
« Last Edit: April 28, 2012, 09:44:42 am by unikron »

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: 2D Toolkit 1.7 beta 3
« Reply #2 on: April 28, 2012, 03:10:26 am »
Badass, thanks for this.

cyro_349

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.7 beta 3
« Reply #3 on: April 28, 2012, 01:23:10 pm »
The Sprite Collection Editor is looking beautiful. Good job.

~Cyro

willrmiller

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: 2D Toolkit 1.7 beta 3
« Reply #4 on: April 28, 2012, 08:20:01 pm »
I just downloaded this release, and am having some trouble with the TileMap feature.  I created a sprite collection with my tiles in it, set up the TileMap as shown in the manual, and painted some tiles in the map.  After I commit the map for the first time, all of my tiles go away (nothing is in the render data) and when I try to paint, nothing shows up.  Interestingly, if I manually reset the Sprite Collection reference in the TileMap to my tiles sprite collection, the tiles show up, but committing makes them disappear again.  I've attached the test project.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.7 beta 3
« Reply #5 on: April 28, 2012, 08:26:01 pm »
Thats an interesting bug - I noticed it on my mac today while testing it. I can't reproduce it on my windows machine though. Which platform are you running on?

Edit: Yours breaks on windows too.
« Last Edit: April 28, 2012, 08:36:13 pm by unikron »

willrmiller

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: 2D Toolkit 1.7 beta 3
« Reply #6 on: April 28, 2012, 08:29:02 pm »
Ah, that's something I forgot to mention.  I'm on an iMac (newest Unity version).  I didn't observe this problem with the beta 2 release on my PC.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.7 beta 3
« Reply #7 on: April 28, 2012, 08:56:25 pm »
I know what this is now - I will issue a fix as soon as possible. I need to test it thoroughly so it doesn't end up breaking anything else.