2D Toolkit Forum
2D Toolkit => Releases => Topic started by: unikronsoftware on December 15, 2013, 09:40:12 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.3/migration_guide.html
Maintenance release
Documentation available at:
http://unikronsoftware.com/2dtoolkit/docs/2.3
Be sure to run "Setup for JavaScript" after importing if you're using this feature. 2.3 is a very big update - and you're likely to have errors if you don't run this properly after restarting Unity.
What's new
- Support for Unity 4.3 - 2D physics and render layers. Notes here (http://unikronsoftware.com/2dtoolkit/docs/2.3/unity_43_integration.html)
- Animating 2D polygon colliders when running under Unity 4.3 2D physics
- Default pixels per meter is now 100 to work better with Unity
- Png atlases - enable in sprite collection settings. Much smaller builds at the cost of some load time.
- Dropped support for Unity older than 3.5. Unity 3.5 support will be dropped in 2D Toolkit 2.4
- Option to disable rotation in sprite collection
- tk2dCamera - Fill scale mode (contributed code, will need to update with contributor)
- tk2dTileMap TMX import now supports rotated / flipped tiles.
- tk2dUIMask - now has sorting layer controls when run on Unity 4.3
- tk2dTileMap now supports Unity sorting layers - this overrides all other sorting controls.
- Added experimental PNG atlas usage detection and unloader - disabled by default. Please help test this if you use PNG atlases. Enable it by uncommenting the first line in tk2dEditorSpriteDataUnloader.cs and restart Unity. You shouldn't notice any difference, but Unity shouldn't run out of memory. There are still cases where things get orphaned, please report back if you find any reproducible ones.
Bug fixes and improvements
- tk2dSpriteAnimator - pingpong mode bugfix with 1 frame
- SetFocus(bool) on tk2dUITextInput, lets you set shift focus to another control from the callback.
- tk2dSpriteAnimator - ProcessEvents works with invalid input
- 2d sprites retain trigger status, should work a bit better than before and shouldn't add random colliders
- Loadable assets now persist after Rebuild Index
- Tilemap error on awake, was harmless but annoying
- Tilemap import bugfix
- FormatText missing InitInstance
- PNG atlases building bug with fonts
- Static sprite batcher null ref error
- one shot audio volume workaround
- tilemap material fix
- material id fix when sprite collection is rebuilt after clearing references with material overrides
- tk2dCameraAnchor - doesn't mark scene dirty every frame
- tilemap - random brush respects flip and rotate flags
- unity 4.3 undo and other compatibility fixes
- removed useGameWindowResolutionInEditor compile warning
- AlphaIsTransparency is set on imported textures
- Sprite collection editor performance improvements, now can handle 10000s of sprites in a collection.
- Hide tk2d widgets when shift is held down to tweak colliders.
- tilemap prefabs that are in the scene will be destroyed if the prefab type is changed.
- Tilemap normals on when sprite collection setting requests normals
-
Thanks a lot! But please, comment what is "one shot audio volume workaround"?
Previously, I had a strange increase in volume, when playing the same audio files in a short time in Camera.main.audio.PlayOneShot().
Is thaht it?
-
Nice! What exactly are the problems with this new version? We really need those PNG atlases, so we are thinking on upgrading our 2DT to this version. Is it a viable workaround for us? I mean, will we have to re-make some things with 2.4 (or the next fixed release)? We are going to upgrade most of our project so we need to be sure that the next version won't break things with the new atlases provided with this one.
-
Its worth a go - it seemed to work fine in our testing, so just turn it on and try it. Its not going to change any runtime code, so everything that happens is editor only. Easy enough to turn off too.
-
Okay, I'll try to find an understandable repro case, but for now our project is still always crashing. We have a very, very large amount of sprites at a very high resolution (that's why we needed to reduce as much as we could the atlas size), but every time we hit Play or try to Build Unity throws the exact same memory leak error and closes. We haven't changed anything aside from the collections (each one of them is now PNG atlas).
-
This is with the data unloader enabled? If so, email me and i'll give you a little bit of debug code to add in there to let you know when it unloads something.
-
NullReferenceException: Object reference not set to an instance of an object
tk2dTextGeomGen.GetMeshDimensionsForString (System.String str, .GeomData geomData) (at Assets/TK2DROOT/tk2d/Code/Fonts/tk2dTextGeomGen.cs:39)
tk2dTextGeomGen.SetTextMeshGeom (UnityEngine.Vector3[] pos, UnityEngine.Vector2[] uv, UnityEngine.Vector2[] uv2, UnityEngine.Color32[] color, Int32 offset, .GeomData geomData) (at Assets/TK2DROOT/tk2d/Code/Fonts/tk2dTextGeomGen.cs:298)
tk2dTextMesh.DoNotUse__CommitInternal () (at Assets/TK2DROOT/tk2d/Code/Fonts/tk2dTextMesh.cs:634)
tk2dUpdateManager.FlushQueuesInternal () (at Assets/TK2DROOT/tk2d/Code/Runtime/tk2dUpdateManager.cs:74)
tk2dUpdateManager.LateUpdate () (at Assets/TK2DROOT/tk2d/Code/Runtime/tk2dUpdateManager.cs:57)
Take this error after update.
-
Can you create a separate post about that with details about what your code is doing there? The only difference there is it tries to initialise itself before using it - previously it should have had an error too unless something else has changed.
-
@unikron Yes, we uncommented that line, so it's enabled. By the way, we are using Unity 4.3.1. What do you want me to email exactly?
-
Nothing just drop me and email and I'll reply with the modified code when I get a chance :)
-
For some reason I can't open Sprite Animation Editor after update. The "Open Editor" button just does nothing in all my projects.
-
It could be that unity bug where the editor window position gets corrupted. You can reset this by Reverting to factory layout in Unity to see if that helps.
-
It could be that unity bug where the editor window position gets corrupted. You can reset this by Reverting to factory layout in Unity to see if that helps.
Yep, it was layout bug! Thank you.
-
Another issue: I can't switch the clips from editor on the fly anymore (inside Sprite Animator). It just plays the clip that was selected when scene started to play.
I tested it for an animation with a low frame rate: when switching, the animation shows a new clip for a moment and then returns to the previously selected.
upd: I also can't change Anim Lib property.
If I start with "once" clip, I can select another animations, but they will not play. If I start with a looped clip, it will stuck and prevent editor from switching to other animations.
-
2 unikronsoftware:
Dinesh, i send to you email with description of error. Do you get it?
-
I believe you mentioned this somewhere else, but I wanted to confirm with you. For the 2D Toolkit UI, you're still sticking with 3D UI elements to detect button presses, correct? Will you update this at a later date if so?
-
Hi,
We are really keen on using the new PNG texture feature of 2.3.3 to decrease our build size. We currently use the multi-platform feature for using different textures on different devices.
However we are finding that we are unable to use the two features together - if we set a sprite collection to use the PNG, it sets it for both of them, and you can't then set the smaller version to use the smaller size.
Is this something you are aware of or are we using it incorrectly?
Thanks,
Tom
-
I believe you mentioned this somewhere else, but I wanted to confirm with you. For the 2D Toolkit UI, you're still sticking with 3D UI elements to detect button presses, correct? Will you update this at a later date if so?
I don't know if we're planning on doing 2D colliders, or simply a custom collision system outside the unity one. I don't see any real benefits of integrating this with the 2d collider system, especially for the UI system.
-
Another issue: I can't switch the clips from editor on the fly anymore (inside Sprite Animator). It just plays the clip that was selected when scene started to play.
I tested it for an animation with a low frame rate: when switching, the animation shows a new clip for a moment and then returns to the previously selected.
upd: I also can't change Anim Lib property.
If I start with "once" clip, I can select another animations, but they will not play. If I start with a looped clip, it will stuck and prevent editor from switching to other animations.
What version did you update from? From what I can see this hasn't changed in a long long time.
-
Hi,
We are really keen on using the new PNG texture feature of 2.3.3 to decrease our build size. We currently use the multi-platform feature for using different textures on different devices.
However we are finding that we are unable to use the two features together - if we set a sprite collection to use the PNG, it sets it for both of them, and you can't then set the smaller version to use the smaller size.
Is this something you are aware of or are we using it incorrectly?
Thanks,
Tom
It will convert both atlases to PNGs, but they will be different PNGs (hd, vs SD pngs) - I've just verified that this works properly in 2.3.3. What are you experiencing specifically with PNG & platforms enabled?
-
What version did you update from? From what I can see this hasn't changed in a long long time.
We updated from 2.3.0 and using Unity 4.3.1f1, also I tested the clip switching in a separate project. The problem remains for some reason.
Do you have any idea what can cause such behaviour? It looks like some state inside of Sprite Animator went mad.
-
What version did you update from? From what I can see this hasn't changed in a long long time.
We updated from 2.3.0 and using Unity 4.3.1f1, also I tested the clip switching in a separate project. The problem remains for some reason.
Do you have any idea what can cause such behaviour? It looks like some state inside of Sprite Animator went mad.
If you can reproduce it in a minimal project, please email it to support, should be easy to test it then. A working and not working copy would be ideal.
-
I updated to this version today and am receiving these 2 errors in Unity immediately after updating:
Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs(564,17): error CS0103: The name `tk2dEditorSpriteDataUnloader' does not exist in the current context
Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs(590,17): error CS0103: The name `tk2dEditorSpriteDataUnloader' does not exist in the current context
I did the "Integrity checker" in the editor and it said it was successful. Should I just comment out those 2 lines or am I doing something wrong?
-
I'm guessing you've moved tk2d from the default installation location / run setup for js. Either move the missing file, or if you ran Setup For JS, run that again.
-
I recently upgraded from TK2D 2.2 Final to 2.3.3, and everything seems to be working very well, with one exception:
My scenes often contain a single, large tilemap, with many (~10) layers. The process of opening the tilemap for edit (in editor mode) and then committing it back (pressing commit, forcing a rebuild) seems to be taking many, many times longer in 2.3.3 than in previous versions.
Where before it would take a second or two, now it takes upwards of many minutes.
Any ideas?
-
There is a bug in Unity. Apparently its been fixed but I don't know which version it'll be fixed in:
http://issuetracker.unity3d.com/issues/bad-undo-dot-recordobject-performance-with-large-number-of-changes
Unity updated the undo system in 4.3, and there is a bug causing slowdowns with large numbers of changes.
-
Any idea where the relevant calls into Undo are? I tried commenting out the functions in tk2dUndo.cs, but I'm still get major major lag, even after a Unity restart. Being able to commit my tilemap is way more important to me right now than working Undo.
-
Sorry, I missed this!
I recommend quickly commenting out all the undo lines in tk2dUtil / tk2dUndo for now. Hopefully unitys "fix" really fixes it and doesn't introduce a load more issues.
-
My ping pong animations all seem to have broken with the last update (presumably due to the pingpong bug fix mentioned). Only the first frame is shown, in editor and in game. Has anyone else seen this happen?
-
Hey there, this was a merge error. Fix here:
http://2dtoolkit.com/forum/index.php/topic,3331.msg16142.html#msg16142
-
I have just found a very unusual error: I have three Sorting Layers, with Default in the middle. When I try to change the Sorting Layer in a tk2dSprite, I can choose top and bottom layer, but not the Default one. When I click on Default it just switches back to the layer it was on before.
-
Is it just me?
I just opened 2dtoolkit in a unity 4.3.3f1
http://i.imgur.com/S9CbZ29.png
2.3.0 in Unity 4.3.3f1 is all right
-
I just made a FAQ entry for this.
Its almost random when this happens, but there is an easy fix.
http://2dtoolkit.com/forum/index.php/topic,3530.0.html
-
Thanks a lot, it works.
-
Why unity animation property donot work for tk2dSprite.scale and tk2dTextMesh.scale and other properties
-
Because Unity doesn't support animating C# properties. The unity animation system can only animate properties from their own C/C++ classes, or variables in C# classes, not properties. You will need an adapter to animate c# properties - search this forum for a few different implementations.
-
Thanks, I found it. But why do not you want to enable this implementation in one of the releases? A very useful option.
-
Its so the user is aware of it, also the users needs could be different. Ultimately I'm still hopeful Unity will fix that stupid bug and allow c# properties to be animated.
-
it seems very little bug.
ScrollableArea example
in ItemTemplate change anchor of picture and then hit to play button
video (https://drive.google.com/file/d/0B1hDSqeU0Zn6c3Y3OWlrNGxoOEE/edit?usp=sharing)
-
Have you submitted a ticket for that bug, unikron? I would do it if you hadn't, it's absurd that isn't fixed yet.
-
I spoke to some (quite a few) Unity devs at Unite a couple years ago. Everyone seemed aware of it then but as far as I know there wasn't any plan to fix it, but I am still hopeful.