Hello Guest

Author Topic: 2D Toolkit 2.0 final + hotfix 2  (Read 15436 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
2D Toolkit 2.0 final + hotfix 2
« on: June 18, 2013, 06:25:54 pm »
Please read the migration guide before updating. 2D Toolkit 2.0 is not API compatible with 1.x.
http://unikronsoftware.com/2dtoolkit/docs/2.00/migration_guide.html

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


Another quick hotfix to fix some critical issues that could affect a very small number of users.

What's new
  • 2D Toolkit UI
  • Sprite handles - you can resize / move(click and drag) / rotate(alt) sprites using the handles. Turn them off in preferences if you don't like them.
  • Static sprite batcher - supports all sprite types (clipped, tiled, sliced, normal) and text meshes too. Multiple materials & sprite collections supported.
  • Animated sprite deprecated in favour of tk2dSpriteAnimator. Works the same, but lets you animate different sprite types.
  • Text mesh supports inline colors and gradient switching. Click the help button in the text mesh editor for more details.
  • "Sprite from Selected Texture" - use to create a sprite without a sprite collection. Use with care, as each will require one draw call. It's not there for convenience, but rather for backgrounds and render textures that can't be atlased.
  • Loads of API improvements.

Bug fixes and improvements
  • Sprite collection picker bugfix - bug occurred in rare cases when switching from a sprite collection to another with the same named sprite in it, and the second sprite collection index was larger than the number of sprites in the first.
  • Scrollable area swipe velocity threshold corrected.
  • Fix for AnimationEventTriggered, if nulled out during a sequence of events
  • Cope with sprite / sprite from texture, added as a component - and cope with some cases
  • SpriteFromTexture implementation changed to avoid some errors - now creates a sprite collection in the scene
  • Added some missing tk2dSpriteAnimator.Play variants
  • Fixed packed fonts - was broken in 2.0
  • Fixed tk2dTextMesh help text for inline formatting - was incorrect
  • Fixed tk2dTextMesh inline styling - was failing in some cases
  • tk2dSprite.SetSprite - print out the sprite name when can't be found
  • Smoothspherecollisions wasn't being transferred to the sprite
  • Tilemap.GetTilePosition returns correct values for isometric tiles.
  • tk2dSpriteAnimationClip copy constructor.
  • Fixed ToggleButtonGroup OnChange order - now called after state is changed.
  • Tk2dExternal.Skin.Done is now static - could run into issues before.
  • tk2dUiManager.OnMouseWheelChange -> OnScrollWheelChange to stop Unity warning during iOS build because function name starts with OnMouse.
  • textInput.SetFocos / IsFocus
  • Sprite handles disable themselves when using vertex snap mode in Unity
  • Selecting an animation clip will now select the first frame group
  • tk2dSpriteAnimation - added "View Data" context menu, to allow viewing data without switching to debug mode.
  • Animation editor - warn when invalid clip is detected, non destructive, but can attempt "fix" if requested
  • tk2dTextMesh.GetMeshDimensionsForString re-instated
  • tk2dStaticSpriteBatcher.UpdateMatrices for legacy support
  • Clipped sprite bounds corrected, now will work correctly on trimmed sprites.
  • Sprite collection polygon collider defaults to front & back collider faces. Was causing a lot of confusion.
  • Creating a sprite will now automatically inherit the layer of the parent.
  • Sprite collection names sorted "naturally"
  • Removed skin assets - the skin is now stored externally in a DLL. Less files in the project, and less likely to break.
  • Sliced sprite legacy mode removed - automatic upgrade should work almost 100% of the time.
  • tk2dUIMask in favour of other masking methods - this is extremely efficient.
  • Default ortho size in sprite collection is now 10, works better with default Unity physics settings.
  • Textmesh data moved to external serializable class. Shouldn't require any changes from user code.
  • Got rid of "Always pixel perfect". Its always more efficient to update the camera to compensate for resolution changes.
  • You can convert between sprite types in the component settings menu - also add or remove animators to a sprite.
  • Moved non-core systems into own directory structures - tk2dUI, and tk2dTileMap.
  • Lots more little bugfixes - please let me know if a bug you've reported isn't fixed.

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Re: 2D Toolkit 2.0 final + hotfix 2
« Reply #1 on: June 18, 2013, 06:36:56 pm »
Nice! Is it submitted to the Asset Store?
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final + hotfix 2
« Reply #2 on: June 18, 2013, 06:41:30 pm »
Yes it is

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Re: 2D Toolkit 2.0 final + hotfix 2
« Reply #3 on: June 18, 2013, 06:41:49 pm »
Perfect.
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.

Afro-Ninja

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 62
    • View Profile
Re: 2D Toolkit 2.0 final + hotfix 2
« Reply #4 on: June 18, 2013, 09:02:18 pm »
hi quick question, are you still planning a lighting add-on for 2dtk? and if so will it integrate with the existing sprite system or require a new kind of component? (such as '2dtk lit sprite' or '2dtk lit animated sprite')

to my knowledge I can have a light source affect all sprites tied to a single material/atlas, but we can't currently have per-object lighting?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final + hotfix 2
« Reply #5 on: June 18, 2013, 10:25:39 pm »
Yes - still planning the lighting add-on. Sadly I haven't had enough time to complete it :(

You will simply need to change the material on the sprite collection atlas for all lit sprites. The light sources need a separate material on them. Apart from that everything just works as expected.

MaaS

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: 2D Toolkit 2.0 final + hotfix 2
« Reply #6 on: June 28, 2013, 11:12:17 am »
Just a suggestion for the sprite gizmo and for the sprite collection anchor position...

I use bigger images for my sprites as I now they will be trimmed later when composing the atlas, but then, the gizmo/handle for that sprite is way bigger than the sprite itself.

Both handle and anchoring seems to use the bounds of the original image as size, not the trimmed bounds as the size of the sprite (or the mesh bounds if you preffer). I dont say this should be that way always (I use the anchor position on my benefit sometime), but a option for gizmos or anchoring (like when "upper center") using the sprite final bounds if trimmed, would be great.

Thanks!!  ;)

« Last Edit: June 28, 2013, 11:14:16 am by MaaS »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.0 final + hotfix 2
« Reply #7 on: July 05, 2013, 01:58:38 pm »
@MaaS - I was about to make this switchable in preferences and then realised its going to be a bit more of a headache than I'd like it to be. Its really easy to switch though... in
tk2dSprite.cs
OnDrawGizmos
untrimmedBoundsData -> boundsData

tk2dSpriteEditor.cs
OnSceneGUI
GetUntrimmedBounds -> GetBounds
untrimmedBoundsData -> boundsData

That's it :)