2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on May 17, 2013, 07:34:19 pm

Title: 2D Toolkit 2.0 beta 1
Post 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

Bug fixes and improvements
Title: Re: 2D Toolkit 2.0 beta 1
Post by: mfcas on May 17, 2013, 07:57:57 pm
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)
Title: Re: 2D Toolkit 2.0 beta 1
Post by: DannyB on May 17, 2013, 08:11:04 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 17, 2013, 08:17:18 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 17, 2013, 08:19:48 pm
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/
Title: Re: 2D Toolkit 2.0 beta 1
Post by: mfcas on May 17, 2013, 08:39:34 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: DannyB on May 17, 2013, 08:42:14 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: TekuStudios on May 17, 2013, 10:52:08 pm
Nice! Any ideas on when will you add the Anchor Points feature? We are kind of desperate for a solution to that.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: DannyB on May 17, 2013, 10:58:42 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 17, 2013, 11:10:40 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 17, 2013, 11:11:08 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: fsadeq on May 18, 2013, 03:47:30 am
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?
Title: Re: 2D Toolkit 2.0 beta 1
Post by: Extant on May 18, 2013, 06:25:10 am
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?
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 18, 2013, 08:51:48 am
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 18, 2013, 10:17:17 pm
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 ;)
Title: Re: 2D Toolkit 2.0 beta 1
Post by: fsadeq on May 18, 2013, 11:02:29 pm
Really? How do you animate more than one sprite at the same time? And what is this sneaky use you speak of? ;D
Title: Re: 2D Toolkit 2.0 beta 1
Post by: x8105 on May 18, 2013, 11:20:30 pm
Facial animations and lipsyncing!!
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 18, 2013, 11:24:35 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: fsadeq on May 19, 2013, 03:06:52 pm
AWESOME - I can animated tiled sprites now! Super helpful.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: fsadeq on May 21, 2013, 05:30:39 am
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: Sundaerae on May 21, 2013, 07:25:04 am
is the pallete ordering for tilemap editor is available on this version?
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 21, 2013, 08:32:46 am
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 21, 2013, 08:34:57 am
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: sofakng on May 21, 2013, 08:55:34 pm
I'm new to Unity and 2D Toolkit but I'm extremely interested in a tilemap system...

I've sent you an e-mail :)
Title: Re: 2D Toolkit 2.0 beta 1
Post by: Arges on May 22, 2013, 11:09:03 am
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 22, 2013, 11:49:57 am
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 24, 2013, 02:41:26 pm
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..
Code: [Select]
http://unikronsoftware.com/2dtoolkit/docs/[b]VERSION[/b]/Docs for 1.92 are also available.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: DannyB on May 24, 2013, 02:47:44 pm
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?
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 24, 2013, 03:38:52 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: Arges on May 26, 2013, 04:06:52 pm
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.



Title: Re: 2D Toolkit 2.0 beta 1
Post by: Moloen on May 26, 2013, 04:16:46 pm
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!
Title: Re: 2D Toolkit 2.0 beta 1
Post by: thefiend on May 26, 2013, 05:08:24 pm
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/)
Title: Re: 2D Toolkit 2.0 beta 1
Post by: Moloen on May 26, 2013, 08:15:11 pm
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
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 26, 2013, 10:55:57 pm
Updated the links thanks for pointing out that it was broken Moloen.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: loofou on May 27, 2013, 10:53:13 am
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?
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 27, 2013, 11:28:45 am
@loofou - Thats an error, it will be fixed in the next beta.
You can add a function to redirect to -
tk2dTextGeomGen.GetMeshDimensionsForString( ... )

Title: Re: 2D Toolkit 2.0 beta 1
Post by: dustinbahr on May 30, 2013, 05:29:02 pm
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!
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 30, 2013, 05:34:15 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: n1ngimi on May 31, 2013, 07:00:54 am
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           }

Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 31, 2013, 10:37:14 am
Thanks for that. It has been changed and will be in the next version.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 10:58:50 am
@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!
Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 11:14:21 am
@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!


Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 11:59:53 am
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?
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 31, 2013, 03:12:12 pm
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?
Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 04:02:31 pm
4.1.3f3

Thanks!
Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 04:03:45 pm
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?

Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 31, 2013, 04:53:13 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 31, 2013, 04:54:36 pm
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?
Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 06:15:30 pm
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!
Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 06:19:05 pm
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!

Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 07:07:30 pm
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?
 
Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 31, 2013, 07:11:49 pm
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.
Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 07:53:33 pm
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 :

Code: [Select]
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.

Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 31, 2013, 10:41:25 pm
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....
Title: Re: 2D Toolkit 2.0 beta 1
Post by: reefG on May 31, 2013, 11:17:30 pm
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!

Title: Re: 2D Toolkit 2.0 beta 1
Post by: unikronsoftware on May 31, 2013, 11:47:49 pm
Glad you like the new features in 2.0.
We're just getting started, a lot more tasty features coming soon :)