Hello Guest

Author Topic: 2D Toolkit 1.91 final + patch 1  (Read 7364 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9707
    • View Profile
2D Toolkit 1.91 final + patch 1
« on: March 15, 2013, 10:51:24 am »
As with all releases, exercise caution when upgrading.
Make sure you have a back up!

FIXES UNITY 4.1 INDEX BUILD ISSUE

Features:
- Brand new sprite picker with preview and filtering, see attached screenshot.
- tk2dCamera supports "inherit settings". This will let you hook up a tk2dCamera prefab, set up the resolution overrides and such on it, and just inherit the settings onto a tk2dCamera in a scene. It is also useful in another scenario,
- tk2dCamera supports clipping. This is an early no-frills implementation, but it works. Notes below.
- tk2dCamera clipping supports resolution overrides.

Bugfixes and improvements:
- Sprite collection editor warns when sprites are missing, and won't allow builds with missing sprites to avoid damaging already built data.
- Fixed clear references in sprite collection editor
- Rebuilt built-in fonts, some were in an ancient format and had never been updated.
- Force texture size is now used properly with platform specific collections
- sprite.collection made private, this was an internal variable which was accidentally left public. Use .Collection instead if you need to read the value, and prefer new SetSprite APIs for setting a new sprite.
- sprite.SetSprite, a unified way to set sprites. SetSprite( spriteId), SetSprite( spriteName ), SetSprite( collection, spriteId), SetSprite( collection, spriteName)
- tk2dGrid, started using in some places
- tidied up preferences system (all current preferences will be lost)
- setting platform in preferences fixed (was broken in 1.91 beta 1)
- stopped breaking spectacularly when there is a broken animation.
- bundled clipping demo (#12), now fully works, resolution overrides are fully supported. Webplayer here: http://unikronsoftware.com/2dtoolkit/webplayer/clippingdemo/
- sprite thumbnails tidied up, always displays as a 128x128 tile in the inspector, sprite itself centered in the tile.
- lots more user friendly functions (tk2dSprite.AddComponent(go, spriteColection, spriteName)) to avoid having to get spriteId.
- upgraded all legacy demo assets
- tk2dTextMesh.FormatString( unformattedSring ) returns formatted string.
- tk2dSpriteCollectionData.GetSpriteDefinition returns a sprite definition.

tk2dCamera clipping notes

- Tk2dCamera now supports viewport clipping. This is only allowed on a second camera, so don't forget to set the "Depth" parameter to something greater than your primary camera, and set clear flags to "Depth only" or "Dont clear" depending on what you want. Also, use layers to mask information from one scene to another.
- The cost of the clipping is close to zero (especially so if you don't clear on the second camera), and you can clip anything. As a downside, you can't rotate the clip region, it must be rectangular and in screen space.
- You can clip anything. Including 3d objects, without messing about with shaders, and at close to zero cost. Check webplayer above.
- If you have 2 tk2dCameras in the scene, you can (and probably should) use "Inherit settings" so you won't have to set up the overrides twice and make sure they're the same.
- The clipping behaves very differently to the built in Unity camera "viewport rect", and has different terminology (region instead of rect).
- The region is like a clip region, it reveals part of the background. Set up the region to 0, 0, 100, 100, and then slide the X value. This will let you really easily set up a level selector visually. Just set it up as though you're drawing everything and set up the the viewport clipping region on the second camera. Tip: set clear color in the 2nd camera to something bright so you can see the region you are revealing.
- You can anchor within clipped regions
- More features will be coming, like anchoring the clip region dimensions, but not in 1.91. The clip region is parent camera space, should be easy to modify externally.

m4ko

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 75
    • View Profile
Re: 2D Toolkit 1.91 final + patch 1
« Reply #1 on: March 15, 2013, 10:54:50 am »
That was quick. Thank you!

hima

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: 2D Toolkit 1.91 final + patch 1
« Reply #2 on: March 15, 2013, 04:30:38 pm »
Works perfectly fine now. Thank you! ^ ^

smith666

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.91 final + patch 1
« Reply #3 on: March 15, 2013, 06:36:23 pm »
Awesome thanks!

Cranick

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.91 final + patch 1
« Reply #4 on: March 15, 2013, 11:19:36 pm »
I get this error message:
TK2DROOT/tk2d/Editor/Sprites/tk2dClippedSpriteEditor.cs(13,40): error CS0103: The name `GetTargetsOfType' does not exist in the current context

Also, when I try to import this package in a new project, I get no error messages, but the tk2dClippedSpriteEditor.cs doesn't get imported along with.

What am I doing wrong?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9707
    • View Profile
Re: 2D Toolkit 1.91 final + patch 1
« Reply #5 on: March 15, 2013, 11:24:53 pm »
Clipped sprite editor is from 1.92. You're probably importing 1.91 patch1 over 1.92?

Cranick

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.91 final + patch 1
« Reply #6 on: March 15, 2013, 11:41:28 pm »
Clipped sprite editor is from 1.92. You're probably importing 1.91 patch1 over 1.92?


Bingo, fixed it, thanks! :)

neo89

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: 2D Toolkit 1.91 final + patch 1
« Reply #7 on: August 10, 2013, 04:06:35 am »
Thanks !