Hello Guest

Author Topic: 2D Toolkit 2.3.0  (Read 64361 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
2D Toolkit 2.3.0
« on: November 12, 2013, 02:33:38 pm »
Please read the migration guide before updating. 2D Toolkit 2.x is not API compatible with 1.x.
http://unikronsoftware.com/2dtoolkit/docs/2.3/migration_guide.html

Documentation available at:
http://unikronsoftware.com/2dtoolkit/docs/2.3


Be sure to run "Setup for JavaScript" after importing if you're using this feature. 2.3 is a very big update - and you're likely to have errors if you don't run this properly after restarting Unity.

What's new
  • Support for Unity 4.3 - 2D physics and render layers. Notes here
  • Animating 2D polygon colliders when running under Unity 4.3 2D physics
  • Default pixels per meter is now 100 to work better with Unity
  • Png atlases - enable in sprite collection settings. Much smaller builds at the cost of some load time.
  • Dropped support for Unity older than 3.5. Unity 3.5 support will be dropped in 2D Toolkit 2.4

Bug fixes and improvements
  • one shot audio volume workaround
  • tilemap material fix
  • material id fix when sprite collection is rebuilt after clearing references with material overrides
  • tk2dCameraAnchor - doesn't mark scene dirty every frame
  • tilemap - random brush respects flip and rotate flags
  • unity 4.3 undo and other compatibility fixes
  • removed useGameWindowResolutionInEditor compile warning
  • AlphaIsTransparency is set on imported textures
  • Sprite collection editor performance improvements, now can handle 10000s of sprites in a collection.
  • Hide tk2d widgets when shift is held down to tweak colliders.
  • tilemap prefabs that are in the scene will be destroyed if the prefab type is changed.
  • Tilemap normals on when sprite collection setting requests normals

jkeon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #1 on: November 12, 2013, 05:25:31 pm »
First off thank you very much for the update, this is really a fantastic product.

Just a couple things I ran into when upgrading that seem to be bugs:
  • tk2dUIItem doesn't have the Auto Fit button for colliders when using 2D colliders. Still works with 3D but not 2D.
  • tk2dUIItems don't register taps/clicks anymore when using 2D colliders. Works fine with 3D colliders still.

I did change my Sprite Collections over to use the Physics 2D in the settings and then committed.

Is there something I'm forgetting to do or are they valid issues?

Thanks again!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #2 on: November 12, 2013, 05:48:27 pm »
tk2dUI doesn't work with 2D colliders yet, as the UI system is independent to the collider settings on the sprite collection.
http://unikronsoftware.com/2dtoolkit/docs/2.3/unity_43_integration.html

We're kinda torn between supporting 2D colliders and rolling our own collision system for that. If we did that we wouldn't have to care about supporting any physics engine, which would be the superior option here. For now, it only works with 3D colliders.

jkeon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #3 on: November 12, 2013, 06:55:59 pm »
Thanks for the quick response. That's understandable and something I can workaround.

Thanks again!

Tochas

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #4 on: November 12, 2013, 11:12:15 pm »
Is safe to upgrade to tk2d v2.3.0 while still using Unity 4.2.x?

I use very large sprite collections to the point that adding one more sprite halts everything to a crawl and takes 20 - 30 min to rebuild.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #5 on: November 12, 2013, 11:14:36 pm »
How big is your sprite collection? 20-30 minutes sounds crazy long. I'd have expected Unity to crash way before that....  :o
It should be safe in Unity 4.2.x, but make a backup of your project before updating!

Sundaerae

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #6 on: November 13, 2013, 05:14:35 am »
When optimizing fillrate, is there any automatic way to do that in 2DToolkit like was shown in unity 4.3? (that alpha-cutout thing)
I do use the Custom Render Mesh in the sprite collection, but having an automatic way to do that would help a lot, and cut the time needed on production pipeline.

Tochas

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #7 on: November 13, 2013, 06:00:49 am »
How big is your sprite collection? 20-30 minutes sounds crazy long. I'd have expected Unity to crash way before that....  :o
It should be safe in Unity 4.2.x, but make a backup of your project before updating!

I have 1881 sprites on a single spritesheet 2048x2048 with 20% wastage, most of the sprites are diced by 16x16. And there are a few more images to add.
Even selecting the spritecollection prefab takes about a minute to show the "open editor" button at the inspector tab.
it takes 20-30 min to build (commit changes) to the sprite collection
Unity does crash if I dicrease the dice size even more, like 8x8.

When optimizing fillrate, is there any automatic way to do that in 2DToolkit like was shown in unity 4.3? (that alpha-cutout thing)
I do use the Custom Render Mesh in the sprite collection, but having an automatic way to do that would help a lot, and cut the time needed on production pipeline.

You can use sprite dicing to improve fillrate. helped me push fps from 12-ish to 60 even on 4thGen iPods.
check http://www.unikronsoftware.com/2dtoolkit/doc/2.00/advanced/sprite_optimizations/sprite_optimizations.html

Afro-Ninja

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 62
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #8 on: November 13, 2013, 07:10:23 am »
are tilemaps automatically included in the 'default' sorting layer?

also am I correct in assuming that tilemap layers will have their layer sort order correctly applied without having to change the z?
« Last Edit: November 13, 2013, 07:41:51 am by Afro-Ninja »

Sundaerae

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #9 on: November 13, 2013, 07:42:24 am »
When optimizing fillrate, is there any automatic way to do that in 2DToolkit like was shown in unity 4.3? (that alpha-cutout thing)
I do use the Custom Render Mesh in the sprite collection, but having an automatic way to do that would help a lot, and cut the time needed on production pipeline.

You can use sprite dicing to improve fillrate. helped me push fps from 12-ish to 60 even on 4thGen iPods.
check http://www.unikronsoftware.com/2dtoolkit/doc/2.00/advanced/sprite_optimizations/sprite_optimizations.html
Like I said, I do use the Render Mesh option. In my opinion, dicing is more useful to avoid atlas wastage, while using custom render mesh is more useful in optimizing fillrate. My only problem with the custom render mesh is that there are no automated process, so I have to check hundred of those sprites, making render mesh for each of them which is taking a long time. I'm asking how to make like what they show in Unite2013, or the alpha cutout in unity 4.3, an automated custom render mesh.

nacs

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #10 on: November 13, 2013, 07:55:06 am »
I don't know how you already have a 4.3 compatible release but however you did it, keep up the great work. :)

Also, love the png atlas support.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #11 on: November 13, 2013, 11:33:58 am »
are tilemaps automatically included in the 'default' sorting layer?

also am I correct in assuming that tilemap layers will have their layer sort order correctly applied without having to change the z?

The tilemaps go into the default sorting layer in 4.3. The sort order isn't changed, it simply sorts by using small z differences as before. Using sort order might be a bit problematic, as in most cases you will want your moving sprites to sort with it correctly.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #12 on: November 13, 2013, 11:34:49 am »
When optimizing fillrate, is there any automatic way to do that in 2DToolkit like was shown in unity 4.3? (that alpha-cutout thing)
I do use the Custom Render Mesh in the sprite collection, but having an automatic way to do that would help a lot, and cut the time needed on production pipeline.

You can use sprite dicing to improve fillrate. helped me push fps from 12-ish to 60 even on 4thGen iPods.
check http://www.unikronsoftware.com/2dtoolkit/doc/2.00/advanced/sprite_optimizations/sprite_optimizations.html
Like I said, I do use the Render Mesh option. In my opinion, dicing is more useful to avoid atlas wastage, while using custom render mesh is more useful in optimizing fillrate. My only problem with the custom render mesh is that there are no automated process, so I have to check hundred of those sprites, making render mesh for each of them which is taking a long time. I'm asking how to make like what they show in Unite2013, or the alpha cutout in unity 4.3, an automated custom render mesh.

Automatic render mesh generation isn't supported yet.

Guerrilla705

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: 2D Toolkit 2.3.0
« Reply #13 on: November 14, 2013, 02:42:34 am »
How should I go about getting the updated 2.3 from having 2.2? It's been a while since I got 2.2, so I don't remember where my invoice is to register on this forum. Is there any way to download 2.3 when I already have 2.2 set up and running? Thanks
lolwat.

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Re: 2D Toolkit 2.3.0
« Reply #14 on: November 14, 2013, 01:41:27 pm »
Unity 4.3 is sometimes crashing by a memory allocation fatal error. It happens randomly when loading a scene on Play, but it always happens when loading our test scene with the new 2DToolkit 2.3 atlases set to PNG atlas (instead of Unity texture). Could there be some memory leaks?
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.