Hello Guest

Author Topic: 2D Toolkit 2.5.3  (Read 7873 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9560
    • View Profile
2D Toolkit 2.5.3
« on: May 24, 2015, 04:26:53 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.4/migration_guide.html

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


Be sure to run "Setup for JavaScript" after importing if you're using JavaScript/UnityScript or Boo.

What's new
  • Support for flat colors instead of interpolated colors in a tilemap
  • Generate normalized UVs - used in tilemap to simplify creating procedurally / shader animated tiles
  • Official support for Unity Windows Mobile and Windows Store in Unity 5
  • Linked sprite collections - allows creating parallel atlases for normal maps, etc. that match the layout of the base atlas. Docs here
  • Basic post build sprite collection callback, tk2dSpriteCollectionBuilder.OnPostBuildSpriteCollection to be notified when a sprite collection is built.
  • Updated to work with Unity 4.6 and 5.0 (Hierarchy "Create" menu moved into "2D Objects")
  • Exported with Unity 4.6.3. Previous Unity versions are not officially supported but all 4.x should work, we will fix issues if they arise. 3.x versions are no longer supported.

Bug fixes and improvements
  • Fixed tilemap bug introduced in 2.5.2
  • Unity 5 sprite disappearing bug fixed
  • Fixed bug with tk2dUITextInput when with platform specific fonts.
  • Dont complain about null fonts that dont need material instances.
  • tk2dTextMesh can now be resized in the viewport when word wrap is enabled.
  • MarkDynamic on dynamic meshes
  • Fixed allocation in tk2dSpriteAttachPoint
  • Unity free skin bugfix
  • Confirmation before Setup for JS
  • Scrollablearea divide by zero
  • iOS workaround for Unity bug (keyboard.text behaves differently on iOS than all other platforms)
  • Fixed a null reference error going from lit to unlit materials
  • Fixed DX11 1/2 texel offset tk2dCamera bug
  • Menu option to rebuild all sprites (when they disappear) until there is a better solution
  • sprite collection editor, added scrollbar to attach point list
  • Added iPhone6 and 6+ resolutions to tk2dCamera
« Last Edit: May 24, 2015, 10:39:24 PM by unikronsoftware »

mrkake

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: 2D Toolkit 2.5.2
« Reply #1 on: May 24, 2015, 08:08:23 PM »
Hi,
I'm not totally sure but I think there can be a bug introduced here, as my game stopped working.

I checked the line where I'm getting the error - tk2dTileMapMeshBuilder.cs line 61.

colorChunk is null, and there is a null reference exception trying to read the values from it.
Strange because line 31 above is checking it's null, but it doesnt stop the code from continuing.
And I see like 79, if (useColor), but this would clearly never be reached.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9560
    • View Profile
Re: 2D Toolkit 2.5.2
« Reply #2 on: May 24, 2015, 10:19:48 PM »
Yeah, my bad :( I'll fix it.
Thanks for reporting it.


Update -
Fixed: Incremented version number to 2.5.3
« Last Edit: May 24, 2015, 10:40:31 PM by unikronsoftware »

mrkake

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #3 on: May 24, 2015, 10:43:50 PM »
tested , its working now :)

thanks! you rule :)

DNA-Studios

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #4 on: May 25, 2015, 10:00:23 AM »
Hey folk,

Thanks a lot for this update, especially for the sprites disappearing :-) However, I get a strange behaviour when trying to patch the API:
  • I first download the package and extract it with python
  • I remove the old version of 2D Toolkit
  • I import the files into Unity (tried both inside and outside Unity)
  • Unity asks me to run the update manager because the library uses some obsolete methods
  • Regardless of what I chose above (automatic update of scripts or if I update them myself), all the tk2d scripts are then displayed as "missing behaviours" in the scenes. Not a single error appears in the console and when I run the game, none of my scripts are able to access a tk2d script.

Any clue about that ? We use Unity 5.0.2 and the TK2DROOT folder is set in a Libraries folder (/Assets/Libraires/TK2DROOT). Integrity checker gives me a full list of incorrect files.

Thanks again.

DNA Studios

jmenossi

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #5 on: May 25, 2015, 10:52:52 AM »
Hi,
I had same problem with obsolete API on Unity 5.0.2...
I'm using tk2d 2.5.1 and tried to update to Unity 5.0.2, but got some errors in tk2d scripts.
Does tk2d 2.5.2 or 2.5.3 actually fix this?
Thanks!

fallingbrickwork

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 30
    • View Profile
    • Montague's Mount
Re: 2D Toolkit 2.5.3
« Reply #6 on: May 26, 2015, 10:44:35 PM »
Great update and no issues here.

A quick Q... Support for flat colors instead of interpolated with Tilemaps, how do we use/setup this (I can't see anything in the docs although I could be looking right at it  ;)?

Cheers,
Matt.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9560
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #7 on: May 27, 2015, 01:14:05 AM »
Its an option in tilemap settings > Tile Properties > Color Mode :)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9560
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #8 on: May 27, 2015, 01:18:23 AM »
Hey folk,

Thanks a lot for this update, especially for the sprites disappearing :-) However, I get a strange behaviour when trying to patch the API:
  • I first download the package and extract it with python
  • I remove the old version of 2D Toolkit
  • I import the files into Unity (tried both inside and outside Unity)
  • Unity asks me to run the update manager because the library uses some obsolete methods
  • Regardless of what I chose above (automatic update of scripts or if I update them myself), all the tk2d scripts are then displayed as "missing behaviours" in the scenes. Not a single error appears in the console and when I run the game, none of my scripts are able to access a tk2d script.

Any clue about that ? We use Unity 5.0.2 and the TK2DROOT folder is set in a Libraries folder (/Assets/Libraires/TK2DROOT). Integrity checker gives me a full list of incorrect files.

Thanks again.

DNA Studios

If the integrity checker gives you a list of incorrect files, then your files are incorrect and updating is going to cause a lot of grief. This usually only happens when not storing meta files at some point in the past.

Also you've moved the folder from its default location, making it harder to overwrite... Removing and adding like you did with a corrupt installation will end up with missing behaviours, and everything is going to be broken. You'll have to import into a new project and manually copy the files and overwrite in this project if you wish to update.

Unity update manager prompts doesn't indicate an issue, it just runs because the unity package was exported from Unity 4. If you download from the asset store using Unity 5 you won't have that message.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9560
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #9 on: May 27, 2015, 01:19:51 AM »
Hi,
I had same problem with obsolete API on Unity 5.0.2...
I'm using tk2d 2.5.1 and tried to update to Unity 5.0.2, but got some errors in tk2d scripts.
Does tk2d 2.5.2 or 2.5.3 actually fix this?
Thanks!

There is no issue in 2.52 / 3 in Unity 5. The obsolete API message is only visible because we exported the package here using Unity 4.6, you can download the same thing from unity asset store and you won't get the message there. There is no known issue updating, post the error you get and should be able to work it out from there.

DNA-Studios

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #10 on: May 27, 2015, 09:15:14 AM »
Hey folk,

Thanks a lot for this update, especially for the sprites disappearing :-) However, I get a strange behaviour when trying to patch the API:
  • I first download the package and extract it with python
  • I remove the old version of 2D Toolkit
  • I import the files into Unity (tried both inside and outside Unity)
  • Unity asks me to run the update manager because the library uses some obsolete methods
  • Regardless of what I chose above (automatic update of scripts or if I update them myself), all the tk2d scripts are then displayed as "missing behaviours" in the scenes. Not a single error appears in the console and when I run the game, none of my scripts are able to access a tk2d script.

Any clue about that ? We use Unity 5.0.2 and the TK2DROOT folder is set in a Libraries folder (/Assets/Libraires/TK2DROOT). Integrity checker gives me a full list of incorrect files.

Thanks again.

DNA Studios

If the integrity checker gives you a list of incorrect files, then your files are incorrect and updating is going to cause a lot of grief. This usually only happens when not storing meta files at some point in the past.

Also you've moved the folder from its default location, making it harder to overwrite... Removing and adding like you did with a corrupt installation will end up with missing behaviours, and everything is going to be broken. You'll have to import into a new project and manually copy the files and overwrite in this project if you wish to update.

Unity update manager prompts doesn't indicate an issue, it just runs because the unity package was exported from Unity 4. If you download from the asset store using Unity 5 you won't have that message.

Hi,

Thanks for your answer :)

The integrity checker complains after trying to update, not before. Anyway, I don't really understand why the location of the library is important since it doesn't contain hard links to itself. I was able to do every update like this (we currently are at 2.5.1).

The update manager will actually perform changes to thoses classes (even when importing from the assets store):
  • tk2dEditorUtility
  • tk2dTileMapEditor

They are using Resources.LoadAssetAtPath instead of AssetDatabase.LoadAssetAtPath.

I think Unity new scenes management may be responsible for this...

Cheers

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9560
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #11 on: May 27, 2015, 09:41:20 AM »
Urgh, no idea why it doesn't do it on my Unity 5 repo - I have 2 parallel checkouts of the same repo, in Unity 4 and 5, as you need to export from 5 for asset store. It definitely has run through the "upgrading API" process at least once :( I'll look into it for the next release.

Moving directory tends to break 2 things - shaders that include fxh files, and if the integrity is broken, it will happily overwrite them, but not if they've been moved.

jmenossi

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #12 on: May 27, 2015, 11:19:15 AM »

There is no issue in 2.52 / 3 in Unity 5. The obsolete API message is only visible because we exported the package here using Unity 4.6, you can download the same thing from unity asset store and you won't get the message there. There is no known issue updating, post the error you get and should be able to work it out from there.

Well, I tried a different way to update:
I first updated to TK2.5.3 in my Unity 5.0.1 (it works fine).
After that, I updated Unity to 5.0.2 and, when opening the project I get the message on image 1 (attached) about obsolete API.
If I click "No thanks" and continue loading the project, I get the error on image 2 on the console, about "LoadAssetAtPath".

I tried to choose the "Go ahead" option (automatic API updater) and it seems to work, but it changed several code and prefab files in TK2D, and I am not sure about what it actually did.
Note that Integrity Check is success after automatic API upgrade.



unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9560
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #13 on: May 27, 2015, 12:59:23 PM »
Thanks for posting that - I was on 5.0.1 hence not seeing the upgrade message.

This upgrade thing is getting ridiculous - I really really need to keep on the lowest version I can get away with, i.e. Unity 5.0.1 otherwise everyone using this will have to upgrade to the latest version of Unity, and with Unitys amazing track record of releasing broken stuff again and again its a terrible idea to upgrade Unity straight away... I'll likely have to re-release this after upgrading to the latest Unity 5.

wagenheimer

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: 2D Toolkit 2.5.3
« Reply #14 on: May 28, 2015, 02:02:36 PM »
"Official support for Unity Windows Mobile and Windows Store in Unity 5"

What is really new here? I was using it before and it seems to be working.