Hello Guest

Author Topic: 2D Toolkit 1.80 + patch 2  (Read 10524 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
2D Toolkit 1.80 + patch 2
« on: November 09, 2012, 10:56:48 pm »
Some bugfixes

This build has been updated with the Kea's fix

Features and changelist. Changes in this update in italics.
Unity 3.5 and above only
Renamed collider types (ForceNone instead of None, UserDefined instead of Unset). Makes a lot more sense.
All mesh leaks plugged, hopefully.
Sprite collection settings page tidied up, added a lot more texture options.
Massive memory saving with large animations (there was a constant overhead, which is now fixed).
New tk2dSystem feature, manages platforms and resources.
Sprite collection can be made loadable - this uses the tk2dSystem resource loading feature, and doesn't need files moved to different locations. The sprite collection can also be loaded by GUID at runtime.
Sprite collections are sorted by name in inspector
Internal data upgrade, slowly moving away from legacy cruft (hopefully still backwards compatible). A message is printed out when sprite collections are upgraded.
Animated sprite bugfix, calling play from an event works.
Runtime sprite collection stuff integrated, use tk2dSprite.CreateFromTexture or tk2dSpriteCollectionData.CreateFromTexture
Switch platfroms in editor in the preferences page. Sprite collections and fonts which have platform data will switch when this is changed.
Sprite collections don't use mipmaps by default.
And loads more small fixes
Unity 4 fixes. Should now work properly with no warnings.
Auto build fixed, and also work for sprite collections with platform specific data. Only the affected sprite collection is rebuilt.
Formatted text implementation, now as it should be. This isn't 100% compatible with the previous version if text is entered in the interface, line breaks may be incorrect, but should be 100% compatible if updated using code.
Fonts in sprite collections try to pick up texture name from bmfont file
Font builder works correctly without requiring renamed textures - it automatically picks up the correct file from the bmfont
Materials are shared properly between sprite collections and fonts, batching should work as expected.
Platform data requirement code should be a lot more stable under weird conditions imposed by Unitys unpredictable script execution order
Fonts switch correctly when changing platform
Material overrides work, but need to be set up in the interface (i.e. new ones will work with platforms)
Fonts in sprite collections can be set up to use overriden materials
Support for gradients for fonts in sprite collection - needs a bit of manual set-up, but works
Rebuilding index will rebuild the tk2dSystem object - none of the resources should be checked in to version control
OrthoSize/texelSize set up properly for text meshes
Tilemaps work, but inefficient when switching platforms - it is vastly more efficient for now to switch platform in editor, load original scene and save scene as @2x, etc, and load the appropriate scene at runtime. Simply loading and saving in editor is sufficient.
Custom sprite geometry & custom colliders work properly.
Platforms are limited to 1x, 2x and 4x for now. More extensive customization will be available in the next release.
tk2dIndex.cs works better when upgrading from an old version
Animation editor bug, wasn't working correctly with sprite collections with platform data
Fixed tk2dSlicedSprite not working when in a prefab
tk2dBaseSprite.GetCurrentSpriteDef wasn't initializing the sprite collection instance correctly
Anchors in platform specific sprite collections were scaled incorrectly
tk2dCamera - added StretchToFit (will stretch to fit the entire screen, regardless of aspect ratio)
Refresh asset database before building - might fix orphaned font issue
Corrected offsets for font embedded in sprite collection
Vertically flipped (hiero) fonts work properly when in sprite collection
tk2dSprite functions work before being Awaked - still best practice not to call tk2dSprite functions from Awake in other scripts
TileMap Editor - right click picks up tiles
Overriding currentPlatform bugfix, now works as expected in editor
Animated sprite now has an overload to play at a different framerate to the animation
Animated sprite has a ClipFps property which can be used to change the fps while the clip is playing
tk2dCamera far clip plane fixed
Added kea's fix (kept same version number, as it hasn't been released on asset store yet, and only a limited number of people have downloaded so far)
« Last Edit: November 11, 2012, 01:16:35 pm by unikron »

DannyB

  • 2D Toolkit
  • Hero Member
  • *
  • Posts: 609
    • View Profile
    • Chicks Ahead
Re: 2D Toolkit 1.80 + patch 2
« Reply #1 on: November 10, 2012, 07:22:41 pm »
This is not yet on the asset store? I am usually updating from there.

Also, does this version solve the menu bug that happens when deleting an animation clip?
When deleting a clip (with the minus button), the animation menu contains a separator where this clip once was.
Not sure if its the same cleanup issue as the font problem that I see was fixed.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.80 + patch 2
« Reply #2 on: November 10, 2012, 11:55:13 pm »
It might be but I'm not sure - I couldn't reproduce it and I really wanted this out to fix some more critical bugs. Drop me an email if you still have the issue and I'll get that sorted ASAP.

Kea

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: 2D Toolkit 1.80 + patch 2
« Reply #3 on: November 11, 2012, 09:30:00 am »
In file tk2dSystem.cs:

Code: [Select]
set
{
if (value != currentPlatform)
{
currentPlatformInitialized = true;
currentPlatform = value;
}
}

mayby must be:

Code: [Select]
set
{
if (value != currentPlatform)
{
#if UNITY_EDITOR
currentPlatformInitialized = true;
#endif
currentPlatform = value;
}
}

?

The definition was:


Code: [Select]
#if UNITY_EDITOR
static bool currentPlatformInitialized = false;
#endif


And another thing:
I have animated sprite. On 1.76 it work fine. When i upgrade to version 1.80 patch 1 some frame was look like sprite height smaller that normal, and animation looks bad. I use iPad 3.

I can add you on testflight and made build for you, or made simple scene and send project to you. (project is big, in final stage, near 1 Gb).

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.80 + patch 2
« Reply #4 on: November 11, 2012, 01:19:04 pm »
@kea - Thanks for the fix there. I've updated this build with the fix and resubmitted to the asset store.

About the issue you're having, I can think of a really simple way to build a repro case for this. The sprite sizes should not have changed at all between versions so it is quite worrying. Drop me an email to support@unikronsoftware.com and we'll discuss this further.