2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on March 11, 2013, 12:38:45 am

Title: 2D Toolkit 1.92 beta 1
Post by: unikronsoftware on March 11, 2013, 12:38:45 am
As with all beta releases, exercise caution when upgrading. Make sure you have a back up!

Features:
- Full undo/redo support & multi-edit support in all scene instances
- Runtime TexturePacker import
    o tk2dSpriteCollectionData.CreateFromTexturePacker, non-XML/JSON simple format, can be written so it doesn't allocate any memory
    o TexturePacker 2D Toolkit exporter is in "tk2d/Goodies/TexturePacker"
    o Sliced/clipped/tiled sprites not supported yet
- Clipped sprite - a hard clipped sprite implementation, now part of the distribution (based of Clipped Sprite Sample)
- Tiled sprite - tiles the same sprite multiple times to fill given dimensions
- Use color32 instead of color, should require a lot less memory
- Sliced sprite "Draw Border Only" mode, just draws the sliced border only omitting the filled middle.
Title: Re: 2D Toolkit 1.92 beta 1
Post by: evs on March 11, 2013, 02:11:44 am
Nice!  8)
Title: Re: 2D Toolkit 1.92 beta 1
Post by: DannyB on March 11, 2013, 06:16:32 am
Nice indeed Unikron.
Thanks for all the time you put in it.
Title: Re: 2D Toolkit 1.92 beta 1
Post by: Cranick on March 11, 2013, 09:52:38 am
Thank you, this is amazing since I have had TexturePacker for a while but couldn't use it for a while until now. This is amazing!
Title: Re: 2D Toolkit 1.92 beta 1
Post by: Izitmee on March 11, 2013, 09:58:17 am
Wohooo! Impressive list of new features :)
Title: Re: 2D Toolkit 1.92 beta 1
Post by: markgrin on March 12, 2013, 02:35:49 pm
thank you so much for tiled sprite!!  Been wanting this.  Works great for me!
Title: Re: 2D Toolkit 1.92 beta 1
Post by: unikronsoftware on March 12, 2013, 02:54:07 pm
thank you so much for tiled sprite!!  Been wanting this.  Works great for me!

I should add, if you're wanting to tile your sprite AND use filtering at the same time, the edge filtering mode should be set to Tile XY in the sprite collection editor. This will give you perfectly seamless tiles, with no filtering borders whatsoever.
Title: Re: 2D Toolkit 1.92 beta 1
Post by: TekuStudios on March 12, 2013, 06:32:17 pm
Hi! I'm experiencing some issues concerning the length of the names of my collections. I'll explain:

First of all, we are working on a 2D sprite based sidescroller but with perspective cameras for some gameplay settings as well as parallax. Besides, our main character has like 20 different animations (for now). The perspective cameras give us some rendering issue, sometimes they render background sprites over foreground sprites due to perspective position of those cameras. To solve this, we have set custom Transparent layers to the sprite shaders, so the cameras render Transparent +1 first, then +2, +3... and so on. This has solved our perspective/rendering problems.

However, this weird workflow has made us set up each character animation in its own sprite collection, so that we can be sure that each animation does not exceed 1 atlas. Then, we give each sprite collection the +15 (player) shader layer so all of them render correctly above the scenery, objects, etc. This results in tens of folders and collections, and one Animation collection that handles them all.

The issue comes now. When I set up a New Clip in the Animation Editor window, if the collection name exceeds 30 characters, Unity gives me an "out of range" array error and crashes. For example, if I name a collection "Main_Ladder_EnterAnimation_Collection" as soon as I create a new clip and call to that collection in the editor Unity crashes. However, if I name it "Main_Ladder_Enter_Collection", which is 29 characters long, everything goes allright and nothing happens.


It's not like it breaks our work, but we thought you may want to know it now that you are working on the v1.92 update.
Title: Re: 2D Toolkit 1.92 beta 1
Post by: unikronsoftware on March 12, 2013, 06:40:12 pm
30 char name is very bizzare indeed. There isn't any code that does anything like that. I'll give it a go.

If you're using a perspective camera, do you have Camera.transparencySortMode set to Ortho?
http://docs.unity3d.com/Documentation/ScriptReference/Camera-transparencySortMode.html
Just asking in case you weren't aware of it. There are obvious cases where that wouldn't work and you'd still need to create material layers.
Title: Re: 2D Toolkit 1.92 beta 1
Post by: fsadeq on March 12, 2013, 06:47:40 pm
Thanks for this. Tiled sprite is rad. Is this possible to extend to Animated Sprites?
Title: Re: 2D Toolkit 1.92 beta 1
Post by: unikronsoftware on March 12, 2013, 07:22:56 pm
Thanks for this. Tiled sprite is rad. Is this possible to extend to Animated Sprites?

Not at the moment. Its quite expensive to update the geometry in this, and its not a good idea to regenerate repeatedly at runtime. I mean you could if you wanted to, but it would end up costing a fair bit of performance.
Title: Re: 2D Toolkit 1.92 beta 1
Post by: TekuStudios on March 12, 2013, 11:21:30 pm
If you're using a perspective camera, do you have Camera.transparencySortMode set to Ortho?
http://docs.unity3d.com/Documentation/ScriptReference/Camera-transparencySortMode.html
Just asking in case you weren't aware of it. There are obvious cases where that wouldn't work and you'd still need to create material layers.
Well, that was helpful indeed! I wasn't aware of that, so I've been doing all that crazy stuff in order to get all my cameras render every sprite correctly. Thanks a lot!
Title: Re: 2D Toolkit 1.92 beta 1
Post by: qslph on March 15, 2013, 11:54:10 am
    不知在那下载呀,有没有中文教程!
Title: Re: 2D Toolkit 1.92 beta 1
Post by: markgrin on March 16, 2013, 05:10:55 pm
Looks like any BoxCollider on a tiledSprite gets set to size of zero. Bug?
Title: Re: 2D Toolkit 1.92 beta 1
Post by: unikronsoftware on March 16, 2013, 05:34:53 pm
Yes, I'll be addressing that in the next update.