Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - test84

Pages: [1] 2
Support / Localization friendly dialog boxes?
« on: April 17, 2014, 11:10:03 pm »

I need to have two versions of texts for dialog boxes (and preferably buttons), one in English and one in Arabic but I don't need to have them all at the same build. I currently have everything in English and for sake of simplicity of Unicode handling, I will draw text boxes in Photoshop as handling Unicode is hell in Unity, at least as I've researched.

So is there any way to have both of these versions of arts of dialog boxes available and swap them with a change language button? If not, it will still be good enough if I can put a compiler directive or something to let me define which language I want to build for and then have some #IF's in compile time to decide which version to load?

Hope I made myself clear enough, if not, please let me know and I'll put it in another word.



For tweening purposes, I resize localScale of a tk2dSprite but it's collider gets resized as well and this causes problems. Any idea how can I prevent tk2d to resize the collider when resizing the sprite via it's scale?


Support / Reference problem.
« on: April 16, 2014, 09:41:20 pm »

I have 2D Toolkit and GoKit in my project and I need to make a new object from 2D toolkit in GoKit but compiler cannot find it and apparently a reference problem and I'm wondering why.

After some inspection, apparently there are 3 solutions for my Unity project and in "Assembly-Csharp" one I can see all of 2D toolkit's folders but GoKit is kinda empty and only of it's folders is present.

In the other hand, in "Assembly-Csharp-firstpass" I can see all of GoKit's but some of 2D Toolkit's.

Also please note that GoKit resides in Plugins folder but 2D toolkit is in it's own folder in root of my Assets folder.

How can I solve it?


Support / Not sure if it's a bug or design decision.
« on: March 31, 2014, 01:36:43 pm »

I wanted to change animation of one of my sprite animators via calling "Play("myClipName")" upon it but it was not successful and animation wouldn't change. Then I realized that I checked "Play automatically" in editor for that sprite animator and once I de-checked it, it was working. So in another way, that check box was forcing the initial animation in animation changes in the future. I tested this in both 2.3.3 and 2.4.0 and was suspecting it might be a bug since this behavior seemed strange to me.

Let me ask a question as well, is there any way to call an animation and force it to restart it if it's already playing back?


Support / Question regarding dicing.
« on: March 29, 2014, 05:42:56 pm »

First of all, thank you for this package.

I have a question regarding dicing. I have some very large spritesheets that I need to put in the game via tk2d and alot of those single sprites in that sprite sheet have a lot in common as each of them only is different slightly than the other one and wanted to know if it's possible for sprites to share same pool of diced sprites.

Let me rephrase it since it might not have been clear.

When I import a sprite sheet and make a collection out of it, I can change their render mesh to dice so the parts that are duplicated, would not take additional space and that's great. BUT is it possible for several sprites in same collection to share a pool of diced sprites so like 10 sprites that have a lot of texture in common would take less space?

Thanks man.

BTW, if you have any other suggestion on how to handle such sprite sheets in tk2d, I would be more than happy to hear it as I have to deal with 4 of these.

Support / Best solution for large backgrounds that are not tilable?
« on: March 19, 2014, 06:19:22 am »

I have some big full screen images like 960x640 that doesn't have repeating parts so dicing won't help. Was wondering which tk2d's data type would do them best. I read your other post and used "Create sprite from image" method, but was wondering if there is a better solution.


Support / How to get input and output of Arabic/Persian/Farsi texts?
« on: March 15, 2014, 02:05:17 am »

I was wondering on how to get Arabic/Farsi text input vai tk2d's input texts and also what should I do if I want to have Arabic/Farsi text on button labels, a.k.a. text meshes.


Support / Can we have control before a toggle button changes state?
« on: March 01, 2014, 10:12:48 pm »

Is there any even that is fired before a toggle contro's IsOn state changes?

What I want is to have some control when player presses a toggle button control but before it actually toggles it, I want to cancel the toggle based on some criteria.

In other words, If you press a toggle button, I want to catch that event, do some checks and if it's valid, let the toggle button change it's state and if the calculations return false, I show an overlay screen and toggle button should not have changed it's state.

Is there like a click or something that toggle button has that help me do that?


Support / Is it not definite when some internal functions are called?
« on: February 26, 2014, 03:58:26 pm »

I'm making some UI with tk2d and used some Checkbox prefab from tk2d to do so. What I do is I check if the Checkbox's GetComponent<tk2dUIToggleControl> ().IsOn is true, I do something then toggle it and by default when the game starts, all the buttons are ON.

Problem is, when I click on these check boxes that are duplicates of each other, in OnClick event, 2 of them report IsOn as False and 3 of them report it as True.

What I assume is that somewhere in tk2d, they are first toggled off and then my OnClick event handler runs but for 3 of them, I first get the Onclick event handler then tk2d (or Unity) takes control and sets it off.

Check thise scene: https://www.dropbox.com/s/n4s2mifi0os7507/shop.unitypackage
(It doesn't have your package)

And check the OnClick event for first button and 2nd button from the left for example. In ShopController.cs file, in Toggle_Equip_Of_PowerUp_1_Click if you put a debug.log you can see that it returns True for IsOn and it's good and what I expect it because in the scene it's toggled true for Is On but the second button from the left's Toggle_Equip_Of_PowerUp_2_Click returns false for IsOn check.

Hope it shows the same behavior on your system as well.

Let me know if you have problem reproducing it.



I have two progress bars in my game and I need to move one in front of the other one sometimes. What I've done is this:

second_progress_bar.transform.position = first_progress_bar.transform.position;

(I also tried to copying transform.position of the 2nd one into a temp variable and then passing it to first one's, no luck)

See the images and please note the position!

but the second_progress_bar doesn't change it's location. In the editor I can see that it has the first_progress_bar's position in it's transform component, but in the game and scene view, it has some offset and is wrong.

Am I missing something?


Support / How to make a tk2dUIProgressBar bar, invisible or disappear?
« on: February 10, 2014, 09:06:11 pm »

If we want to make a normal Unity GO disappear or invisible, we put it's renderer's enabled property to false. But how can I do the same with a tk2dUIProgressBar?


Support / TextInput bug?
« on: January 27, 2014, 02:15:18 pm »

I put 11 TextInputs next to each other not using layouts or anything with 11 TextMeshes, and a button. Upon the load, in Awake, I set some values in those TextInputs via their Text property.

Problem is, some of TextInputs are acting strange and do not show the value in them and do not show anything at all. If you click/touch those, it shows the text input indicator and if you press left on keyboard, the number suddenly pops up.

You can download the scene here: https://www.dropbox.com/s/alrd05lufi0ybgd/tk2dbug.unitypackage
(I didn't include any tk2D code inside it)

Support / Broken font on 2.3.3's TextInput? Anyone else?
« on: January 27, 2014, 02:04:16 pm »

I just upgraded to 2.3.3 just to realize that all the fonts' in TextInputs are broken. I think the material was set to an incorrect font but I changed it and didn't fix it.


Support / How to have a progress bar.
« on: January 18, 2014, 03:32:50 pm »

I was wondering what's the fastest way to have a progress bar in tk2d. Also I wan it to have a background or something so user can easily identify how much of the progress bar is currently filled.

Just found the progress bar prefab but two questions:

1- What are bare essentials to use UI elements like buttons or this progress bar?

2- Buttons and most UI elements ar eunder 2k2dUI_demo folder. Why it says demo? Does it mean we can't use them in

3- What's the best way to find and alter value of progress bar? For example, one game objects decides to change value of progress bar or progress bar needs to monitor value that it will show from another game object's value. What method do you suggest?


Support / Problem with setting up UI.
« on: January 18, 2014, 03:26:45 pm »

In various parts of the UI documentation, you refer to "Setting up UI" but I can't find it (like here: http://www.2dtoolkit.com/docs/latest/ui/customizing_button.html). I could put a BasicButton on the scene but don't know how to attach the behavior from the documentation to it.

I really wish there was a complete tutorial for UI as I see there are some advance stuff there but can't get my head around them.


Pages: [1] 2