Hello Guest

Author Topic: 2D Toolkit 2.1 beta 1  (Read 21089 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9673
    • View Profile
2D Toolkit 2.1 beta 1
« on: July 07, 2013, 04:20:04 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.10/migration_guide.html

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

NOTE: Documentation and demos haven't been updated for the new features in 2.1 yet, that will be done by the next beta.

What's new
  • Tilemap editor - Flipped tile support.
  • Tilemap editor - Unlimited scratchpad to store templates / custom tile layouts.
  • Tilemap editor - Tile paint mode massively improved with new UI, vertex color paint supports individual channels.
  • Tilemap editor - Instanced prefabs are saved. You can change properties on them and they will be remembered.
  • Tilemap editor - Physics material can be set up per tilemap layer.
  • Attach points - You can now set up attach points directly on the sprites. You can attach other sprites to these attach points, or simply use them as markers in your code. When set up on a frames of animation, these will be animated together with the frames.
  • Sprite collection builder - duplicate textures are now removed, textures are compared by a contents hash.
  • Sprite collection global texture rescale.
  • tk2dCamera v3 - now much better than before. Preview of native resolution, preview resolution in viewport.
  • tk2dCamera v3 - Uses game view resolution/aspectratio as "preview resolution" when present, no need to enter resolutions twice.
  • tk2dCamera v3 - Zoom Factor (replacing zoom scale), works with or without overrides
  • tk2dCamera v3 - Size set up as "ortho size" or "pixels per meter". Default legacy size, Pixels per meter = 1
  • tk2dCamera v3 - Works on perspective camera as well, allowing for 1:1 to be exact at any resolution
  • tk2dCamera v3 - hides the Unity camera implemnentation to avoid confusion
  • tk2dCamera v3 - supports multiple cameras with different sizes in scene, uses unity layers to VERY quickly detect the right camera for a sprite / object.
  • tk2dCamera v3 - Override UI revamped.
  • tk2dCameraAnchor - Works with any camera type, including perspective.
  • Sprite collection / font editor - will automatically detect camera settings if a tk2dCamera is found in the scene, less room for error. Set up exactly the same as a tk2dCamera.
  • Static sprite batcher - option to sort by camera, allows correct sorting when not viewed straight along z axis.
  • PlayMaker actions included - unpack from tk2d/Goodies/PlayMaker Actions

Bug fixes and improvements
  • Packed fonts fixed.
  • Text mesh inline styling bugfix when used from code.
  • Sprite selector bugfix.
  • UI scrollablearea fixed to work the same regardless of resolution.
  • UI scrollablearea - OnScroll is now triggered when expected.
  • UI scrollablearea - MeasureContentLength, for when you just want to fit the content you've dynamically created at runtime.
  • Diced texture parameters are shown in the editor - easier to make decisions on dice size.
  • Font - cope with invalid characters.
  • Tilemap - bugfix with color interpolation at boundaries.
  • Sprites - Scene widget works at any axis.
  • UI demo - old sans font replaced.
  • And many many more bugfixes - Let us know if a bug you reported isn't fixed.
« Last Edit: July 07, 2013, 04:22:41 PM by unikronsoftware »

igmon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #1 on: July 07, 2013, 06:14:24 PM »
I got this compile error:

Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteAnimatorEditor.cs(222,33): error CS0246: The type or namespace name `tk2dUISpriteAnimator' could not be found. Are you missing a using directive or an assembly reference?

Looks like a dependency for the tk2d UI stuff.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #2 on: July 07, 2013, 06:16:21 PM »
Great! Thanks for this. Quick question, though - My Tilemap toolbar icons are blown up and super blurry for some reason. This is only an issue for my existing tile maps. If i make a new tilemap, the icons look perfectly crisp. Any idea why this would be happening?? I've tried completely deleting the TK2DROOT folder and re-importing this latest release, but it still looks blurry/blown up with my existing maps. I've attached a picture so you see what I'm talking about:

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9673
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #3 on: July 07, 2013, 06:23:05 PM »
I got this compile error:

Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteAnimatorEditor.cs(222,33): error CS0246: The type or namespace name `tk2dUISpriteAnimator' could not be found. Are you missing a using directive or an assembly reference?

Looks like a dependency for the tk2d UI stuff.

Did you selectively not import the UI stuff?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9673
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #4 on: July 07, 2013, 06:24:12 PM »
Great! Thanks for this. Quick question, though - My Tilemap toolbar icons are blown up and super blurry for some reason. This is only an issue for my existing tile maps. If i make a new tilemap, the icons look perfectly crisp. Any idea why this would be happening?? I've tried completely deleting the TK2DROOT folder and re-importing this latest release, but it still looks blurry/blown up with my existing maps. I've attached a picture so you see what I'm talking about:

Is there something in the quality settings rescaling your textures? By a new tilemap, I'm guessing its within the same project?

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #5 on: July 07, 2013, 06:27:25 PM »
Actually - good point. In a different project. My texture quality settings are set at half-res. Making them full-res fixes it.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #6 on: July 07, 2013, 07:29:03 PM »
Instanced prefab data still is pretty buggy. It doesn't save them 50% of the time. One scenario that I can replicate each time is:

-Edit the tilemap, paint a prefab tile, commit
-Select the prefab, change some values
-Edit the tilemap again, create a color channel
-Paint anything with the color channel
-Delete the color channel
-Commit the tilemap

Prefab instance data is no longer saved and reverted to the default values.

igmon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #7 on: July 07, 2013, 10:04:38 PM »
I got this compile error:

Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteAnimatorEditor.cs(222,33): error CS0246: The type or namespace name `tk2dUISpriteAnimator' could not be found. Are you missing a using directive or an assembly reference?

Looks like a dependency for the tk2d UI stuff.

Did you selectively not import the UI stuff?

Yeah, I'm using my own UI stuff and haven't decided to use the tk2d stuff just yet. It's no biggie, just something that breaks compile if someone doesn't import the UI portion of tk2d.

aaron7090

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #8 on: July 07, 2013, 11:02:15 PM »
There is a bug with tk2dTextMesh.Commit(); the first time it works the second time the tk2dTextMesh.Commit(); renders nothing. Only noticed this issue when I tested on a android device.

profanicus

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 167
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #9 on: July 08, 2013, 05:14:19 AM »
WOW this new tk2d camera is awesome. Seriously good - I just love the pixels per meter.

m4ko

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 75
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #10 on: July 08, 2013, 08:49:01 AM »
I have a question regarding the new camera:

Up until now I used ScaledResolution to scale a sprite in width. I have a TopLeft and TopRight tk2d anchor set. There is a gui tile in both of them connecting in the center at native resolution. If the aspect ratio is increased there will be a gap. That is where the tiled sprite is placed. I set its x-dimension to the gap-size.

Now with the ScaledResolution i did this:
Code: [Select]
p_sprite_barExtension.dimensions = new Vector2(BLAH.ScaledResolution.x - (600 * 2), p_sprite_barExtension.dimensions.y);

As you removed ScaledResolution I guess there is a better alternative? I don't understand all the tk2dcamera details. Could you help me out to get the correct gapo size again?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9673
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #11 on: July 08, 2013, 01:53:36 PM »
@m4ko -
I'll cover all of those little changes in the migration guide and new docs for tk2dCamera. Since the tk2dCamera can now be any size (not limited to 1 pixel per meter), something like the code you have could be meaningless at a different resolution.

Eg. if you want to fill the screen, regardless of camera size, etc.
float dimensionX = cam.ScreenExtents.width / ( sprite.CurrentSprite.texelSize.x * sprite.scale.x );
will do the job.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9673
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #12 on: July 08, 2013, 01:55:55 PM »
There is a bug with tk2dTextMesh.Commit(); the first time it works the second time the tk2dTextMesh.Commit(); renders nothing. Only noticed this issue when I tested on a android device.

Renders nothing, as in doesn't do anything, or actually clears the data? Can you post in a bit more detail in the private support forum, please?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9673
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #13 on: July 08, 2013, 01:57:58 PM »
Instanced prefab data still is pretty buggy. It doesn't save them 50% of the time. One scenario that I can replicate each time is:

-Edit the tilemap, paint a prefab tile, commit
-Select the prefab, change some values
-Edit the tilemap again, create a color channel
-Paint anything with the color channel
-Delete the color channel
-Commit the tilemap

Prefab instance data is no longer saved and reverted to the default values.

I think you posted this before, and I must've missed this. Thanks for reminding me, it'll be fixed in the next release.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: 2D Toolkit 2.1 beta 1
« Reply #14 on: July 08, 2013, 04:27:22 PM »
Instanced prefab data still is pretty buggy. It doesn't save them 50% of the time. One scenario that I can replicate each time is:

-Edit the tilemap, paint a prefab tile, commit
-Select the prefab, change some values
-Edit the tilemap again, create a color channel
-Paint anything with the color channel
-Delete the color channel
-Commit the tilemap

Prefab instance data is no longer saved and reverted to the default values.

I think you posted this before, and I must've missed this. Thanks for reminding me, it'll be fixed in the next release.

Great, thanks. Also, not sure it's already on your radar but it was mentioned before that you can no longer use your mouse wheel to scroll the palette in the tilemap editor.