2D Toolkit Forum
2D Toolkit => Releases => Topic started by: unikronsoftware on May 17, 2013, 07:34:19 pm
-
Please read the migration guide before updating. 2D Toolkit 2.0 is not API compatible.
http://unikronsoftware.com/2dtoolkit/docs/2.00/migration_guide.html
Documentation available at:
http://unikronsoftware.com/2dtoolkit/docs/2.00
What's new
- 2D Toolkit UI
- Sprite handles - you can resize / move(click and drag) / rotate(alt) sprites using the handles. Turn them off in preferences if you don't like them.
- Static sprite batcher - supports all sprite types (clipped, tiled, sliced, normal) and text meshes too. Multiple materials & sprite collections supported.
- Animated sprite deprecated in favour of tk2dSpriteAnimator. Works the same, but lets you animate different sprite types.
- Text mesh supports inline colors and gradient switching. Click the help button in the text mesh editor for more details.
- "Sprite from Selected Texture" - use to create a sprite without a sprite collection. Use with care, as each will require one draw call. It's not there for convenience, but rather for backgrounds and render textures that can't be atlased.
- Loads of API improvements.
Bug fixes and improvements
- Clipped sprite bounds corrected, now will work correctly on trimmed sprites.
- Sprite collection polygon collider defaults to front & back collider faces. Was causing a lot of confusion.
- Creating a sprite will now automatically inherit the layer of the parent.
- Sprite collection names sorted "naturally"
- Removed skin assets - the skin is now stored externally in a DLL. Less files in the project, and less likely to break.
- Sliced sprite legacy mode removed - automatic upgrade should work almost 100% of the time.
- tk2dUIMask in favour of other masking methods - this is extremely efficient.
- Default ortho size in sprite collection is now 10, works better with default Unity physics settings.
- Textmesh data moved to external serializable class. Shouldn't require any changes from user code.
- Got rid of "Always pixel perfect". Its always more efficient to update the camera to compensate for resolution changes.
- You can convert between sprite types in the component settings menu - also add or remove animators to a sprite.
- Moved non-core systems into own directory structures - tk2dUI, and tk2dTileMap.
- Lots more little bugfixes - please let me know if a bug you've reported isn't fixed.
-
Some problems, needed to change:
toggleBtns[n] = toggleControls[n].toggleBtn;
to
toggleBtns[n] = toggleControls[n];
I don't really even know if that makes sense.
line 66 in tk2dUIToggleControlGroup.cs
And lots of errors when trying to build with monodevelop, which are alike this one:
TK2DROOT\tk2d\Editor\Tilemap\tk2dTileMapUtility.cs(7,7): Error CS0246: The type or namespace name 'tk2dRuntime' could not be found (are you missing a using directive or an assembly reference?) (CS0246) (Assembly-CSharp-Editor)
-
Hey,
This list looks awesome, and I see the UI toolkit is in. Nice.
I am arguing with myself whether I should install this in my soon-to-be-ready-for-appstore game.
Can't wait to see the updated docs, but do you also intend to keep the old ones accessible? Please do if not too much trouble.
-
Some problems, needed to change:
toggleBtns[n] = toggleControls[n].toggleBtn;
to
toggleBtns[n] = toggleControls[n];
I don't really even know if that makes sense.
line 66 in tk2dUIToggleControlGroup.cs
And lots of errors when trying to build with monodevelop, which are alike this one:
TK2DROOT\tk2d\Editor\Tilemap\tk2dTileMapUtility.cs(7,7): Error CS0246: The type or namespace name 'tk2dRuntime' could not be found (are you missing a using directive or an assembly reference?) (CS0246) (Assembly-CSharp-Editor)
Thanks for pointing that out.
1. Delete tk2dUIToggleControlGroup.cs & the editor - it isn't used any more and functionality has been merged into tk2dUIToggleButtonGroup. Sadly Unity package upgrades can't delete files, just ever create them... I'll add that to the migration docs.
2. I don't get any errors on a clean installation - likely due to the directory structure change and Unity leaving files in other directories. Please verify that all your tilemap runtime files are in the same directory. Default should be Tk2DROOT/tk2dTileMap/Code.
-
Hey,
This list looks awesome, and I see the UI toolkit is in. Nice.
I am arguing with myself whether I should install this in my soon-to-be-ready-for-appstore game.
Can't wait to see the updated docs, but do you also intend to keep the old ones accessible? Please do if not too much trouble.
I wouldn't put it in a nearly ready game - its a beta after all :)
Maybe if you desperately need some features...
I'll definitely keep the old docs - I just need to get around to making my docs update script upload to the correct directory and have an index of archived versions. But for now heres a permanent url to 1.92 docs: http://unikronsoftware.com/2dtoolkit/docs/192/
-
2. I don't get any errors on a clean installation - likely due to the directory structure change and Unity leaving files in other directories. Please verify that all your tilemap runtime files are in the same directory. Default should be Tk2DROOT/tk2dTileMap/Code.
Yeah my bad, some files got changed but their names remained the same, after some name swapping the errors were no more.
-
Maybe if you desperately need some features...
Need? No, but I love your updates so I desperately want it... :)
Good to know about the docs. I am guessing I am not the only one with Unity code that uses 1.x and would be too risky to migrate.
-
Nice! Any ideas on when will you add the Anchor Points feature? We are kind of desperate for a solution to that.
-
Nice! Any ideas on when will you add the Anchor Points feature? We are kind of desperate for a solution to that.
You mean the camera anchors? It is quite easy (in fact, easier) to do on your own, without that camera solution that forces you to parent the anchored objects.
-
Nice! Any ideas on when will you add the Anchor Points feature? We are kind of desperate for a solution to that.
The next update will be 2.1 - the big tilemap system update - its nearly done now. I might be able to sneak in the back end for the anchor system in there. The front end code should be quite straightforward.
-
Nice! Any ideas on when will you add the Anchor Points feature? We are kind of desperate for a solution to that.
You mean the camera anchors? It is quite easy (in fact, easier) to do on your own, without that camera solution that forces you to parent the anchored objects.
This is for sprite anchors - i.e. being able to mark attach points on sprites, etc.
-
This is a great release, thanks! I've successfully upgraded, though I have a question. You say the new tk2dSpriteAnimator works the same, but you can animate different sprite types. Which types do you mean? Are you saying you can make a sprite animation out of sliced sprites or whatever?
-
Hello, just upgraded to this new version and the bug as described in http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1508.0.html (http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1508.0.html) still exists. Possible to get this fixed for the next beta?
-
That one is likely fixed on the tilemap branch. I'll see if I can merge it across - I've been trying to avoid that to avoid merge conflicts later, but this looks like it could be easy enough to do without breaking anything.
-
This is a great release, thanks! I've successfully upgraded, though I have a question. You say the new tk2dSpriteAnimator works the same, but you can animate different sprite types. Which types do you mean? Are you saying you can make a sprite animation out of sliced sprites or whatever?
Yes.
Also, since its no longer tied to exactly one sprite, it can now animate a bunch of sprites at a time too if necessary. And there is one sneaky use for this ;)
-
Really? How do you animate more than one sprite at the same time? And what is this sneaky use you speak of? ;D
-
Facial animations and lipsyncing!!
-
No lipsync of facial animation, but...
Since the animator is decoupled from the sprite itself, it can now animate a proxy object which doesn't do anything - but internally creating a bunch of hidden sprite children which don't get deleted - only one is enabled at a time. Sounds a bit crazy, but it gives you one big advantage - the cost of changing frames costs a lot less with this, and you can also have complex colliders (polygon colliders too!) animating. Its not something you want to use every time, but there are times this could be invaluable.
Another use - since the animator can also link up and play variants of the same animation in sync, so you can say Play("walk") and you can have all bodyparts animating correctly without having to sync everything up by hand.
-
AWESOME - I can animated tiled sprites now! Super helpful.
-
Pretty big bug - not sure how to replicate it, thought. I was messing with a Static Sprite Batcher that also has children game objects. When I committed the batch, all the child objects disappeared. I then pressed 'edit' again on the batcher and then 'commit', and the children objects came back, only this time they were duplicated several times. I pressed edit/commit once again, and the children objects now doubled. If I keep doing this, the nested objects will just continue to double.
-
is the pallete ordering for tilemap editor is available on this version?
-
is the pallete ordering for tilemap editor is available on this version?
No tilemap updates are isolated in a different branch at the moment, but it is very nearly ready - will be in 2.1. I'll be able to release a beta of that once 2.0 is out of the way.
p.s. if you want to try out what we have right now - update to 2.0 beta and send me a PM / message - I should be able to get you a snapshot. Its still a WIP, but its feature complete.
-
Pretty big bug - not sure how to replicate it, thought. I was messing with a Static Sprite Batcher that also has children game objects. When I committed the batch, all the child objects disappeared. I then pressed 'edit' again on the batcher and then 'commit', and the children objects came back, only this time they were duplicated several times. I pressed edit/commit once again, and the children objects now doubled. If I keep doing this, the nested objects will just continue to double.
Can you email / PM what its printing out in the console? The double children bug only happens when there is an error and its broken out of the loop - it would certainly have printed out one or more errors in the console.
-
I'm new to Unity and 2D Toolkit but I'm extremely interested in a tilemap system...
I've sent you an e-mail :)
-
Is there a list of known animation issues? After I converted everything from a tk2dAnimatedSprite to a Sprite Animator, I could not get a specific animation to play. Digging into the code showed that id from the frame being obtained was on a different clip. I had previously run the integrity checker and it reported everything was OK. The only thing odd was that Unity 4.1.2 crashed during package import, but it's been doing that more and more often.
-
There isn't a list of animation issues, but since its a beta there could be unknown issues.
How are you calling Play on the animation?
Can you distill this down to a basic repro case to send to support? Obv this is the quickest way to get the issue resolved.
-
Just uploaded docs from 2D Toolkit 2.0 beta 2
http://unikronsoftware.com/2dtoolkit/docs/2.00/
Moving forward docs from all future versions will be available at this address..
http://unikronsoftware.com/2dtoolkit/docs/[b]VERSION[/b]/
Docs for 1.92 are also available.
-
Moving forward docs from all future versions will be available at this address..
Excellent. Maybe also style the docs root page (http://unikronsoftware.com/2dtoolkit/docs/) and make the main documentation link go to this (soon to be styled-) page.
No?
-
Moving forward docs from all future versions will be available at this address..
Excellent. Maybe also style the docs root page (http://unikronsoftware.com/2dtoolkit/docs/) and make the main documentation link go to this (soon to be styled-) page.
No?
Good idea. Added to todo.
-
There isn't a list of animation issues, but since its a beta there could be unknown issues.
How are you calling Play on the animation?
Can you distill this down to a basic repro case to send to support? Obv this is the quickest way to get the issue resolved.
It's a simple "spriteAnimator.PlayFromFrame(clipName, frameNum)". I stashed the changes to continue moving forward on the project, but will aim to get a small repro case done when I get a bit.
-
Please read the migration guide before updating. 2D Toolkit 2.0 is not API compatible.
http://unikronsoftware.com/2dtoolkit/docs/200/
This link is currently not working. It gives me a 404 error not found. Could you please re-upload the migration doc? (I'm on 1.92)
I'd love to try out the new features from 2.0. By the way I'm SUPER excited that you integrated UI into your plugin!
-
This link is currently not working.
Link is missing a period in between the 2 & 0.
Try this: http://unikronsoftware.com/2dtoolkit/docs/2.00/ (http://unikronsoftware.com/2dtoolkit/docs/2.00/)
-
Doh! How did I not see that? By the way here's the direct link to the migration guide if anyone wants to know.
http://unikronsoftware.com/2dtoolkit/docs/2.00/migration_guide.html
-
Updated the links thanks for pointing out that it was broken Moloen.
-
Just one quick question about migrating textmeshes. I used the now gone "GetMeshDimensionsForString" method and can't find the alternative anywhere. I guess it's just renamed or in another class. Any help?
-
@loofou - Thats an error, it will be fixed in the next beta.
You can add a function to redirect to -
tk2dTextGeomGen.GetMeshDimensionsForString( ... )
-
Hello!
The 2.0 release migrated swimmingly, great guides!
I had a quick question though, does the "create sprite from selected texture" support platform settings in any way?
I wanted to use it for a background that only appears once, but even if that's the case, I still don't want a massively sized texture on older non-retina devices if possible.
Thanks, its looking awesome!
-
No it doesn't at the moment. Maybe in a future version, but the issue with platform related loading is things need to be in resources, etc. Hard to manage from the toolkits standpoint.
-
toggle button , When OnChange event , selectedIndex = ( before change Index ) <<
tk2dUIToggleButtonGroup.cs
127 if (toggleButton != selectedToggleButton)
128 {
129 if (OnChange != null) { OnChange(this); }
130 selectedToggleButton = toggleButton;
131 SetSelectedIndexFromSelectedToggleButton();
132 }
u can change
127 if (toggleButton != selectedToggleButton)
128 {
129 selectedToggleButton = toggleButton;
130 SetSelectedIndexFromSelectedToggleButton();
131 if (OnChange != null) { OnChange(this); }
132 }
-
Thanks for that. It has been changed and will be in the next version.
-
@loofou - Thats an error, it will be fixed in the next beta.
You can add a function to redirect to -
tk2dTextGeomGen.GetMeshDimensionsForString( ... )
Hello, I also have this issue, can you elaborate on what I need to do to fix it?
Many thanks!
-
@loofou - Thats an error, it will be fixed in the next beta.
You can add a function to redirect to -
tk2dTextGeomGen.GetMeshDimensionsForString( ... )
Hello, I also have this issue, can you elaborate on what I need to do to fix it?
Many thanks!
Ah not to worry, I've re-instated the GetMeshDimensions function from my Diffs and it appears to be working again!
-
I'm getting a warning when building for iOS :
Game scripts or other custom code contains OnMouse_ event handlers. Presence of such handlers might impact performance on handheld devices.
UnityEditor.HostView:OnGUI()
Do I need to disable anything?
-
I"m pretty sure there aren't any OnMouse* functions anywhere. I'll check with an iOS build shortly. What version of Unity are you building on?
-
4.1.3f3
Thanks!
-
Also, a quick question :
Is it possible to attach a UICamera to the UIManager at runtime ? UICamera is Read Only, is there a reason for this?
-
4.1.3f3
Thanks!
Nothing to worry about. Unity seems to be doing a string compare to find functions starting with OnMouse, the one we use is an internal event which shouldn't cause any issues at all. I'll rename it in the next release - no more warnings after renaming it.
-
Also, a quick question :
Is it possible to attach a UICamera to the UIManager at runtime ? UICamera is Read Only, is there a reason for this?
No specific reason, but there didn't seem to be any compelling reason to create/modify it at runtime either. Any specific reason you might want to do that, seeing that the rest of the system is built to be set up visually anyway?
-
4.1.3f3
Thanks!
Nothing to worry about. Unity seems to be doing a string compare to find functions starting with OnMouse, the one we use is an internal event which shouldn't cause any issues at all. I'll rename it in the next release - no more warnings after renaming it.
Awesome, thanks!
-
Also, a quick question :
Is it possible to attach a UICamera to the UIManager at runtime ? UICamera is Read Only, is there a reason for this?
No specific reason, but there didn't seem to be any compelling reason to create/modify it at runtime either. Any specific reason you might want to do that, seeing that the rest of the system is built to be set up visually anyway?
Nothing I can't work around, I'm creating my Cameras at run time, so wanted to be able to attach one to the UIManager after creation.
Fantastic framework, and an awesome update by the way!
-
Also, a quick question :
Is it possible to attach a UICamera to the UIManager at runtime ? UICamera is Read Only, is there a reason for this?
No specific reason, but there didn't seem to be any compelling reason to create/modify it at runtime either. Any specific reason you might want to do that, seeing that the rest of the system is built to be set up visually anyway?
Actually, no second thoughts, I think it would be useful to be able to attach the camera at runtime.
My Cameras are instantiated from prefabs. My UIManager is also instantiated from a prefab.
So unless I'm missing something obvious, I'm not able to attach my chosen camera instantiation time without UICamera being public.
What do you think?
-
Does it work OK for you if you made it public? I can and I will, but since I don't have a test case for this its probably worth checking your findings first.
-
Does it work OK for you if you made it public? I can and I will, but since I don't have a test case for this its probably worth checking your findings first.
Yes, works perfectly for me if I add a public setter to tk2dUIManager.
The only issue I see is finding a safe way to suppress the :
if (uiCamera == null)
{
Debug.LogWarning("Camera needs to be attached to tk2dUIManager for it to work");
}
Can the setUp code move to Start() from Awake() ?
I may also want to change the camera at a future point in time too, looking at the code it doesn't look problematic to me, but let me know what you think.
Perhaps we could have a specialised subclass that is prefab / instantiate at runtime friendly.
-
It should be fine to change the camera. It simply uses it to raycast, so there isn't really any issue with that.
I'm not sure if anything should be one about that message - perhaps you could addcomponent on a disabled game object, so awake doesn't get called immediately, and then enable it? The message is rather critical to the enduser, though it obviously isn't in your case....
-
It should be fine to change the camera. It simply uses it to raycast, so there isn't really any issue with that.
I'm not sure if anything should be one about that message - perhaps you could addcomponent on a disabled game object, so awake doesn't get called immediately, and then enable it? The message is rather critical to the enduser, though it obviously isn't in your case....
Great, thanks for looking into this.
I'm sure I can live with the warning, it's fully explainable, and I guess I'm probably a bit of an edge case!
I think adding a setter for UICamera will be more than fine for what I need.
Loving the new features in 2.0.0, thanks!
-
Glad you like the new features in 2.0.
We're just getting started, a lot more tasty features coming soon :)