2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on August 15, 2013, 08:46:22 pm

Title: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 15, 2013, 08:46:22 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.20/migration_guide.html

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


What's new

Bug fixes and improvements
Title: Re: 2D Toolkit 2.2 beta 1
Post by: Mikael1987 on August 15, 2013, 09:01:21 pm
Thank you :)
Title: Re: 2D Toolkit 2.2 beta 1
Post by: hippocoder on August 15, 2013, 09:07:29 pm
Really great update.

One thing our artist was moaning about recently is, he uses hundreds of 16x16 tiles and we were wondering if there's a way to zoom in on those tiles, or have a scratch pad of tiles? :)
Title: Re: 2D Toolkit 2.2 beta 1
Post by: funshark on August 15, 2013, 09:47:06 pm
That is pretty good news!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: outtoplay on August 15, 2013, 10:22:34 pm
Terrific!  Wonderful work to a constantly improving toolset.  Digital beers all around!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: profanicus on August 15, 2013, 11:35:40 pm
  • Default sprite collection size is now 2048. 1024 is no longer a sensible minimum. No one targets iPhone3G anymore, right?

Hmm I thought people still targeted the 3GS as it uses iOS6 (and has a 1024 max texture size). Or am I wasting my time supporting it?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 15, 2013, 11:45:22 pm
  • Default sprite collection size is now 2048. 1024 is no longer a sensible minimum. No one targets iPhone3G anymore, right?

Hmm I thought people still targeted the 3GS as it uses iOS6 (and has a 1024 max texture size). Or am I wasting my time supporting it?

Isn't iPhone3GS max texture size 2048? Its got pretty much the same gfx chip as the iPhone4 in it. I haven't got a device handy, but all the benchmarks I can find online say max texture size on 3GS = 2048. Am I mistaken?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: profanicus on August 15, 2013, 11:50:09 pm
Oh, I have been going off the list on iosres.com (http://www.iosres.com/) which claims it is 1024. Maybe they are wrong! I foolishly didn't check any other sources.

edit: they have a link at the bottom that goes to the actual texture limits and it is 2048, you are right. As you were. :)
Title: Re: 2D Toolkit 2.2 beta 1
Post by: ijijn on August 16, 2013, 04:11:56 am
Thank you for another amazing update! I'm particularly interested in this new Layout business.  :)

ij
Title: Re: 2D Toolkit 2.2 beta 1
Post by: x8105 on August 16, 2013, 05:07:56 am
Render Layers - AWESOME~
tk2dUI Multiple Cameras - SWEET!
tk2dUILayout and tk2dUILayoutSizer .... Speechless...
tk2dUI Skin LAyout betterworkflow... O M G!
tk2dUI Demo's... enh
tk2dTextMesh no longer requires a commit... I LOVE YOU!
tilemap tiles can now be rotated. I LOVE LAMP!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: kremedved on August 17, 2013, 05:37:16 pm
I have error, when i start scene "4 - UI Masks".

Quote
NullReferenceException: Object reference not set to an instance of an object
tk2dUIDemo2Controller.Start () (at Assets/TK2DROOT/tk2dUI_demo/tk2dUIDemo2Controller.cs:29)

rectMin[0] = windowLayout.GetMinBounds();
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 17, 2013, 05:51:29 pm
I have error, when i start scene "4 - UI Masks".

Quote
NullReferenceException: Object reference not set to an instance of an object
tk2dUIDemo2Controller.Start () (at Assets/TK2DROOT/tk2dUI_demo/tk2dUIDemo2Controller.cs:29)

rectMin[0] = windowLayout.GetMinBounds();

Unity version? Do you get the same result in an empty project?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: kremedved on August 17, 2013, 07:43:47 pm
I have error, when i start scene "4 - UI Masks".

Quote
NullReferenceException: Object reference not set to an instance of an object
tk2dUIDemo2Controller.Start () (at Assets/TK2DROOT/tk2dUI_demo/tk2dUIDemo2Controller.cs:29)

rectMin[0] = windowLayout.GetMinBounds();

Unity version? Do you get the same result in an empty project?

4.2. Yes.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 17, 2013, 08:30:47 pm
Sorry I misread your original question. That is indeed a bug - that scene isn't meant to have any scripts on there at all, and I never tested Playing it!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: landon912 on August 18, 2013, 05:00:06 pm
Nice Update!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: orb on August 19, 2013, 05:56:56 am
Excellent! The layout stuff makes me very happy.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: profanicus on August 19, 2013, 08:42:34 am
Some issues with Layout:

Title: Re: 2D Toolkit 2.2 beta 1
Post by: jacky on August 19, 2013, 11:41:43 pm
First of all, the new layout system looks great!

One question though, is it possible to use non-tk2d elements in the layout? The first that comes to mind is the GUIText. We need the ability to display, for example, Chinese characters. This is pretty impractical with bitmap fonts.

Thanks!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: profanicus on August 20, 2013, 12:23:23 am
First of all, the new layout system looks great!

One question though, is it possible to use non-tk2d elements in the layout? The first that comes to mind is the GUIText. We need the ability to display, for example, Chinese characters. This is pretty impractical with bitmap fonts.

Thanks!

It works with gameobjects, and will position but not scale them in exactly the same way that a tk2dTextMesh currently behaves. In fact, I don't think the system really supports tk2dTextMesh at all, but positions the gameobject regardless of what component is on it (unless it's a sprite or layout) - so yes it should work with GUIText in the same way.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: jacky on August 20, 2013, 05:33:41 pm
Quote
It works with gameobjects, and will position but not scale them in exactly the same way that a tk2dTextMesh currently behaves. In fact, I don't think the system really supports tk2dTextMesh at all, but positions the gameobject regardless of what component is on it (unless it's a sprite or layout) - so yes it should work with GUIText in the same way.

I was hoping this would be the case but I tried throwing a GUIText in and it did not move with the button. I am assuming that this has something to do with the transform. The GUIText uses a transform from 0 to 1 (with 1, 1...ignoring z) being at the bottom right(?) of the screen. I am thinking that I could create a custom class by extending GUIText and calculating the transform but I am hoping there is an easier solution that I am missing!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 20, 2013, 05:38:47 pm
No, Unity GUIText is not drawn with the rest of the geometry. Its drawn by the GUILayer component on the camera, which means it can't be fit into the rest of the pipeline even if you use the correct materials.

A unity textmesh on the other hand, can be made to work by simply setting the correct shader on it.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 20, 2013, 05:40:58 pm
Some issues with Layout:

  • First up I just want to say that it's awesome. :)
  • When adding a Container Sizer component it is not sized to take into account the pixel scale - my containers come in really tiny.
  • Sizing the Layouts when in Edit mode really screws things up and should be discouraged.
  • How about editing the Layouts numerically, set exact pixel perfect multipliers, or reset them to their original size?
  • The gizmo that sets the scale anchors, maybe we could click in the middle to toggle all/none? ATM it takes four clicks to set a common scenario.
  • Will we be able to scale textmesh? Seems text always stays the same size when I scale up the layout
  • Maybe the Layouts themselves could have a definable anchor other than just the top left. Seems a problem atm when trying to use a Container to distribute buttons evenly without scaling them - currently it doesn't work as anything not scaled is fixed to the top left of the Layout. It's almost like everything should be able to act like the Text currently does, moving rather than scaling.
  • edit: I've found changes to a layout are not being updated until you click another object in the hierarchy


Sizing the layouts in edit mode is sometimes necessary - eg to reposition the layout object relative to the children.
The main problem with anything pixel based is, how do you decide what units to use?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: jacky on August 20, 2013, 06:13:19 pm
Ouch. I was worried that might be the case! This is quite a dealbreaker for apps that need to be localized in languages such as Chinese. I saw an old post with talk of using packed fonts. Even doing it that way you would still have to have a quite a few textures to hold all of the characters in the Chinese language!

Any suggestions on how to use tk2d with languages like this? Is it even possible? I love what you have done with the layouts and I would love to be able to use it in all of my apps!

Thanks again for the amazing product and support!!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 20, 2013, 07:06:21 pm
Ouch. I was worried that might be the case! This is quite a dealbreaker for apps that need to be localized in languages such as Chinese. I saw an old post with talk of using packed fonts. Even doing it that way you would still have to have a quite a few textures to hold all of the characters in the Chinese language!

Any suggestions on how to use tk2d with languages like this? Is it even possible? I love what you have done with the layouts and I would love to be able to use it in all of my apps!

Thanks again for the amazing product and support!!

But the Unity text mesh (not tk2d text mesh) will work with this. Doesn't that play well with dynamic fonts?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: profanicus on August 21, 2013, 12:04:08 am
I've played some more and most of my problems came from trying to use layout for something it wasn't really designed for. What I was trying to do was use the Layout Container Sizer purely as a tool to distribute child objects evenly within an area. It almost worked. :)
Title: Re: 2D Toolkit 2.2 beta 1
Post by: Izitmee on August 21, 2013, 12:40:29 pm
Just a small feedback. I would suggest letting the camera being set with "forced resolution" at false by default, which is the default setting with previous versions I suppose? I had to go through all scenes of my project and let the new camera update after having set it myself (and after finding myself scared by the camera stretching instead than staying pixel perfect as I had it :D)

EDIT: ooops, sorry, this comment was meant for v2.1
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 21, 2013, 07:40:34 pm
Hey. The new camera setting simply uses your game window resolution by default. So if you want to preview as it'll draw on an iPhone4, pick an iPhone4 resolution in game window and thats all you need to do. With the old system you had to override it, etc, but now it really isn't necessary, just set your game window to what you want to preview at.
Would that work for you?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: Izitmee on August 21, 2013, 10:19:25 pm
It works great! And actually to get back to pixel-perfect I just had to uncheck "forced resolution" :) By the way, the new camera inspector and functions are really cool!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: jacky on August 22, 2013, 01:49:54 am
Quote
But the Unity text mesh (not tk2d text mesh) will work with this. Doesn't that play well with dynamic fonts?

Sorry, I have not had a chance to work on this too much. I tried putting a TextMesh into the layout but the text was extremely pixelated. It could be an issue with something that I did but I had some other things come up so I haven't had a chance to work on it too much. I will update when I back to it! Thanks!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: beardkey on August 22, 2013, 04:13:33 am
I just installed 2.2 beta (on unity 4.1.5f1) and am running in to some odd behavior. I have one scene that uses a tk2d camera, with a tk2d uiManager script attached. When I play and move to a different scene the camera follows through as if marked as DontDestroyOnLoad().

If I create a generic camera and set it up like in the UI Getting Started (http://unikronsoftware.com/2dtoolkit/doc/2.20/ui/getting_started.html) doc, I have no such problem.

Am I doing something obvious, or should I no longer be using the 2dtk camera I had set up before?

Edit: Another oddity - following the Advanced UI Layout (http://unikronsoftware.com/2dtoolkit/doc/2.20/ui/advanced_layout.html) doc, after playing with 5 buttons I started trying out different proportions. I'm finding that half the time I try it begins to offset the button texture and text oddly, and I'm unable to hit R to reset it unless I delete that game object.

It seems to only happen when I clear the Proportion by hitting backspace all the way before typing a new number, rather than just highlighting it and replacing. Example can be seen here (http://imgur.com/jCvJKjyl).
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 22, 2013, 10:17:24 am
@beardkey -

1. You attach the tk2dUIManager script to the camera? You shouldn't if you're doing that - the tk2dUIManager is meant to be persistent, but the camera isn't. Create a UI manager separately to the camera.

2. Can you give me steps on how to reproduce this in the demo? I'm not able to reproduce this. Thanks!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: srivello on August 22, 2013, 01:20:32 pm
Hi! I'm loving tk2dTileMap and excited for the next public release. I'm using this beta and have an architectural question.

I'd like to lock a camera to a spiral shape made of tiles. At runtime I'd like left/right to rotate the spiral shape (as one unit) and have a player which falls with physics. The user will rotate the spiral to guide the falling player to the center of the spiral.

QUESTION
1. What is the best setup for this? 2k2DTileMap (with colliders in the sprite collection) for the spiral and 2k2dsprite (with box collider and rigidbody)?
2. Or a  layer within 2k2DTileMap (with colliders in the sprite collection) for the spiral and 2k2dsprite (with box collider and rigidbody)?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: beardkey on August 22, 2013, 01:43:04 pm
1) I had been using the same camera I set up when going through the 2.1 instructions, which had me set up the UI Manager and I just threw it on the Camera for ease of use. It had worked no problem until the update. Knowing now that it will stay persistent I'll try to figure this out. I'm not sure how though since I need to drag a reference to the main camera in each scene. I'm probably just missing something, I'll toy around with it a bit after work today.

2) It's odd, I can't directly reproduce it with anything that's in the UI Layout Demo scene consistently. For instance if I try using the DistributedButtons that are already set up, it happens only once in every 15 times I load the scene, and only if I set them to Vertical so far. HOWEVER, here are steps that get it to happen every time.


Following those steps exactly, each time, give me this result (http://imgur.com/UKxgjqt)
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 22, 2013, 02:03:10 pm
Hi! I'm loving tk2dTileMap and excited for the next public release. I'm using this beta and have an architectural question.

I'd like to lock a camera to a spiral shape made of tiles. At runtime I'd like left/right to rotate the spiral shape (as one unit) and have a player which falls with physics. The user will rotate the spiral to guide the falling player to the center of the spiral.

QUESTION
1. What is the best setup for this? 2k2DTileMap (with colliders in the sprite collection) for the spiral and 2k2dsprite (with box collider and rigidbody)?
2. Or a  layer within 2k2DTileMap (with colliders in the sprite collection) for the spiral and 2k2dsprite (with box collider and rigidbody)?

If I understand this properly, I think the best option is to keep the tile map static and move gravity / addforce to the rigidbody to simulate changing gravity based on rotation. Obviously you should rotate the camera with the direction to make it seem like the whole world is rotating.
It'll be much more efficient than moving the tiles.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 22, 2013, 02:05:34 pm
1) I had been using the same camera I set up when going through the 2.1 instructions, which had me set up the UI Manager and I just threw it on the Camera for ease of use. It had worked no problem until the update. Knowing now that it will stay persistent I'll try to figure this out. I'm not sure how though since I need to drag a reference to the main camera in each scene. I'm probably just missing something, I'll toy around with it a bit after work today.

2) It's odd, I can't directly reproduce it with anything that's in the UI Layout Demo scene consistently. For instance if I try using the DistributedButtons that are already set up, it happens only once in every 15 times I load the scene, and only if I set them to Vertical so far. HOWEVER, here are steps that get it to happen every time.

  • Load the UI Layout Demo scene
  • Add empty game object to the scene with GameObject -> Create Empty
  • Component -> 2D Toolkit -> UI -> Core -> Tk2dUILayoutContainerSizer
  • Drag four Buttons from the ControlPrefabs/Layout folder on to the GameObject
  • Select the GameObject and hit the Proportional button
  • In the Items list, select BasicButton 3
  • Click in the Proportion field, hit backspace and type in a '3'
  • Disable the LayoutDemo game object if you want to see it better

Following those steps exactly, each time, give me this result (http://imgur.com/UKxgjqt)

1. We changed the behaviour of UI Manager to decouple it from the camera allowing multiple cameras, and making it easier to switch scenes - and while the new approach is backwards compatible to previous setup, I didn't anticipate anyone attaching the UIManager to the camera ;) Anyway, with 2.2 (the 2.2 docs have been updated to reflect this), you attach a tk2dUICamera script to every camera that is to be considered for the UI. If you don't need to set up any custom properties on the UIManager, you don't even need to create one.

And thanks for #2 - I'll investigate this.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: Izitmee on August 25, 2013, 09:37:35 am
Hi,

just a note. I updated to v2.2beta because v2.1 had made Unity unstable (I'm not sure why, but now everything seems to be ok again). Only problem I found, is that "force resolution" was not remembered on my tk2dCameras, and I had to uncheck it again.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 26, 2013, 02:21:54 pm
I'll check this out - will sort it out for then next release.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: Izitmee on August 26, 2013, 02:31:00 pm
By the way, even with 2.2 Unity (4.2) is still kind of unstable, even if less than with 2.1. I don't know if it's just a coincidence and something else happened that corrupted Unity, but it started immediately after I updated 2D Toolkit (which anyway is awesome - I have to repeat this now and then :D)
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 26, 2013, 02:38:58 pm
It shouldn't have changed anything substantial - unstable how? Just random crashes?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: Izitmee on August 26, 2013, 06:33:47 pm
Random crashes when pressing PLAY or STOP in the editor.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: beardkey on August 27, 2013, 05:40:56 am
Hate to say it but I'm going to have to pass on this for a while. I've spent way too much time with the layouts, and they're just acting funky (clicking on different items in the Items list causing buttons to shift in the scene for instance). I'm wondering if it's because I have a camera size of 480 and have to scale buttons up, since that seems to be the only real difference between the working examples and what I have going. Maybe I'm just cursed. I've been trying to get things to work and suddenly the fonts on the buttons in the demo scene look like this (http://imgur.com/TE3VvnP) with any font I choose... I think that's an omen to give up till next release.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 27, 2013, 12:04:03 pm
The fonts doing that is nothing to do with the layouts actually - I'm pretty sure I know what that is. Open up the sprite collection editor and look at this. Make sure the font slot isn't null, and commit the sprite collection.

That one parameter does some weird stuff when upgrading Unity, I've had it lose the reference a few times for no apparent reason.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 27, 2013, 12:07:46 pm
Random crashes when pressing PLAY or STOP in the editor.

Hmm bizarre, can't say I've seen anything like that. Anything special in the scene? Any spew in the editor log after the crash?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: Izitmee on August 27, 2013, 12:24:14 pm
Hmm bizarre, can't say I've seen anything like that. Anything special in the scene? Any spew in the editor log after the crash?

Nope, Unity simply freezes and I have to force close it.

The scene contains an interface made with 2D Toolkit cameras and anchors (but no tk2dUI), my pooling system, tweens of various kinds, and regular 3D objects, and it's the same scene I work on since months (since it randomly generates content).

Again, it's quite bizarre indeed, and something might've happened unrelated to 2D Toolkit (I mean, that was the only asset/big-chunk-of-code I updated before this started happening almost immediately after, but still, Unity sometimes is strange). And Unity freezes a lot less since updating from 2.1 to 2.2.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 27, 2013, 12:39:15 pm
That makes it even weirder.
Nothing substantial has changed between 2.1 -> 2.2 with any of that stuff you're using.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: gary-unikronsoftware on August 27, 2013, 04:00:56 pm
1) I had been using the same camera I set up when going through the 2.1 instructions, which had me set up the UI Manager and I just threw it on the Camera for ease of use. It had worked no problem until the update. Knowing now that it will stay persistent I'll try to figure this out. I'm not sure how though since I need to drag a reference to the main camera in each scene. I'm probably just missing something, I'll toy around with it a bit after work today.

2) It's odd, I can't directly reproduce it with anything that's in the UI Layout Demo scene consistently. For instance if I try using the DistributedButtons that are already set up, it happens only once in every 15 times I load the scene, and only if I set them to Vertical so far. HOWEVER, here are steps that get it to happen every time.

  • Load the UI Layout Demo scene
  • Add empty game object to the scene with GameObject -> Create Empty
  • Component -> 2D Toolkit -> UI -> Core -> Tk2dUILayoutContainerSizer
  • Drag four Buttons from the ControlPrefabs/Layout folder on to the GameObject
  • Select the GameObject and hit the Proportional button
  • In the Items list, select BasicButton 3
  • Click in the Proportion field, hit backspace and type in a '3'
  • Disable the LayoutDemo game object if you want to see it better

Following those steps exactly, each time, give me this result (http://imgur.com/UKxgjqt)

I have managed to recreate the problem and it would appear that when you hit backspace to change the proportion number, it treats this as a zero and sizes the button accordingly but causes some of button information to be set incorrectly.  Then when you enter a correct proportion value, it tries to calculate the size and position but because some of the information is correct now, it doesn't work properly.  A quick fix for this is to not allow any zero proportion values, so in the file tk2dUILayoutContainerSizer.cs, partway through the function there should be this code:

Code: [Select]
for (int i = 0; i < n; ++i) {
var item = layoutItems[i];
if (!item.fixedSize && item.fillPercentage <= 0) {
childSize[i] = space * item.sizeProportion / proportionSum;
}
}

If you change it to this:

Code: [Select]
for (int i = 0; i < n; ++i) {
var item = layoutItems[i];
if (!item.fixedSize && item.fillPercentage <= 0) {
childSize[i] = space * item.sizeProportion / proportionSum;
}

if(Mathf.Approximately(childSize[i], 0.0f) || childSize[i] < 0.0f) return;
}

That should provide a temp fix until it is fixed in the next release.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: beardkey on August 27, 2013, 08:26:43 pm
To both the font fix and the code fix, looks like that works for now, thanks! Since I've been such a debbie downer, let me just say everything else looks great and promising. One suggestion - in the UILayout component, a way to set the button's stretch geometry (whatever you want to call that, the green box with I marks around it) to all would be handy, but not necessary. I can live with four clicks.

As to the font issue - it looks like for me it was broken at some point during my Git commit/push/pull. At least I know where to go to fix it now, thanks!

Edit: Ah-hah moment. I was close, it's not quite the camera. We're also using SmoothMoves and, up until this update I had been using a standard Orthographic camera. Due to the native size of our SmoothMoves characters, we had been scaling everything else accordingly, so our camera is at a scale of 480. Similarly, I scaled up the buttons by 400 in the Transform in order to appropriately have them displayed. If I just dragged them to size, the text would remain too small.

Apparently, this is a no-no and is what is causing all of my major layout issues. Working with things at a scale of 1 is great, but even at a scale of 10 I start seeing issues with the buttons overlapping eachother and not moving around / adjusting properly.

Should I instead be working at a scale of 1 for the camera and downsizing all of our SmoothMoves animations and characters? Or is there something I can do to get the tk2d items to work at the higher scale?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 28, 2013, 10:29:24 am
This has never been tested with scale != 1, so I'm guessing this is "expected".
I'll investigate that.

You can use separate cameras for your smooth moves / tk2d sprites. That might make things easier as you wont have to work to constraints of one or the other. Check the UI sample (the one with 3d UI) on how to set this up.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: fattie on August 29, 2013, 10:13:49 am
Regarding 3GS.  Yeah it DOES SEEM TO WORK with 2048.  I find the sprite size limitations very confusing on iPhone, and hard to find real information on.  Because bizarrely .. it even seems to work with 4096 (!) Perhaps in the pipeline it chops it down and does something really slow if you (foolishly, as it were) use textures that are too big.

Regarding "should you target 3GS" personally I say "No."  But for a client with 1m players on a game, tragically, yeah, some 100,000s end users still have a frikkin' 3GS.  It's worth noting that YOUNGER AUDIENCE often has crappier older devices -- it's obvious when you think about it.  (They get Mom's old phone - that sort of thing.)

  • Default sprite collection size is now 2048. 1024 is no longer a sensible minimum. No one targets iPhone3G anymore, right?

Hmm I thought people still targeted the 3GS as it uses iOS6 (and has a 1024 max texture size). Or am I wasting my time supporting it?

Isn't iPhone3GS max texture size 2048? Its got pretty much the same gfx chip as the iPhone4 in it. I haven't got a device handy, but all the benchmarks I can find online say max texture size on 3GS = 2048. Am I mistaken?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: fattie on August 29, 2013, 11:46:50 am
Regarding TILEMAP ...

I just tried importing 2.2b1 into a fresh new blank project.

In fact, I unselected TileMap (and UI) as I am not using them.

Actually, it doesn't work --

for example tk2dEditorUtility OnUndoRedo() references TileMap.


I'm thinking, would it be better if one could cleanly not install TileMap / UI ?

Cheers Fattie
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on August 31, 2013, 12:01:03 pm
Yup I'll remove that dependency before the next release.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: orb on September 05, 2013, 10:07:17 pm
I've been using this beta for a while now, and it's been working pretty well apart from one thing. I can't get render layers to actually depth sort the sprites at all! Things will pretty much remain in the order they feel like, with all sprites sorted to Z=0. This is in Unity 4.2 on OS X.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on September 06, 2013, 01:42:22 pm
Are you using a perspective camera? If you can reproduce that reliably, drop me an email at support at unikronsoftware dot com with a simple repro case and I'll investigate.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: vicenterusso on September 07, 2013, 12:56:33 am
Sorry if wrong thread  :-[

I want to know what version I'm using right know.. anywhere in the code says the version?
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on September 07, 2013, 09:17:12 am
2D Toolkit > About. Create a new thread in the support / private support forum if it isn't about this beta though.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: fattie on September 07, 2013, 11:58:24 am
Unikron dudes --

I'm thinking, just a simple one it would be great if you could put ALL the DEMO material,

under ONE folder.

(A detail, if you also throw the PDF / etc in there.)

That would be GREAT .. for the reason that when you import using Unity's process, you could turn off importing the DEMO material decisively with one click.

That would be great!
Title: Re: 2D Toolkit 2.2 beta 1
Post by: orb on September 07, 2013, 01:28:08 pm
Are you using a perspective camera? If you can reproduce that reliably, drop me an email at support at unikronsoftware dot com with a simple repro case and I'll investigate.
Orthographic only. I've made some workarounds that work for me, although they're not clean. I'll see if I can build it reliably and send you a project :)
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on September 09, 2013, 02:35:57 pm
Unikron dudes --

I'm thinking, just a simple one it would be great if you could put ALL the DEMO material,

under ONE folder.

(A detail, if you also throw the PDF / etc in there.)

That would be GREAT .. for the reason that when you import using Unity's process, you could turn off importing the DEMO material decisively with one click.

That would be great!

Hello - is the source only version not sufficient for your needs? I'm slightly reluctant to move things around - as you probably know moving things around and importing into a Unity project can result in some pretty disasterous results, especially if the users metadata is already broken...
Title: Re: 2D Toolkit 2.2 beta 1
Post by: fattie on September 15, 2013, 02:46:02 pm
You're right, moving things around is hell.  So true.

But what about this ONE relatively modest - and worthwhile - change.

Simply, make a new folder at the top with a big name like "ALL DEMO MATERIAL IN HERE ONLY FOREVER /"

from then on,

every and all demos, manuals, notes, readmes, PDFs, etc would be in that folder.

this would be incredibly handy.

Note that the only downside is, it could be that someone leaves hanging around some particular demo file, in the "old" location and also in the new ultra-demo-folder location.

It's kind of like this event ...

http://en.wikipedia.org/wiki/Dagen_H

... the sooner it's done the better  :)

It's an interesting observation that you probably never have to do this, but every single time I update I spend 20 minutes swearing about trying to find all the damn demo files  :)  Is it safe to delete this png?  what's this?  etc etc.  (recall that the stupid interface in Unity does not "stagger out" folders correctly so there's really no clue what's happening anyway.)
Title: Re: 2D Toolkit 2.2 beta 1
Post by: unikronsoftware on September 15, 2013, 09:41:46 pm
Moving the demo folder around will cause a lot of issues. It might be easier for me to batch a new package without demos altogether, but that will pretty much get rid of all the UI components... Something to think about at least.
Title: Re: 2D Toolkit 2.2 beta 1
Post by: fattie on September 16, 2013, 07:25:37 am
"Moving the demo folder around will cause a lot of issues"

Ah in that case - it was a bad idea!  :)  We don't want no issues ...


I'm thinking, could you include a script "delete all demo material" which does that?  Or at worst just a note in the readme "You can safely delete these files..."

Just a thought