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.


Messages - larryapple

Pages: [1]
1
Support / How to set tk2dTextMesh
« on: June 23, 2013, 03:58:44 am »
Sorry to keep stumbling over basic issues. I have a login text input, which works fine. Then I want to display the logged in user name. So I have a tk2dUIItem with a tk2dTextMesh child. Your docs say that the text mesh has a Text field, which I want to set with the user name. But if I define a tk2dTextMesh variable, I can't drag the text mesh child to it to make it accessible in my script. So I define a tk2dUIItem, but then how do I find its text mesh child?

Then I want to populate the lobby list of games from the SmartFox server, and then be able to click on one and retrieve the user name. Do you have any sample code or snippets for this kind of thing?

2
Support / Re: 2 cameras and depth
« on: June 23, 2013, 02:30:34 am »
Thanks for prompting me to stop and think. I just started deactivating things in the scene until it saw the deck card again. Turns out that when I dismissed the panel, I didn't put it quite as far off the screen as originally. (I was experimenting with camera field of view to make the cards as large as possible for each aspect ratio, by placing the deck further to the left on 16 x 9, and the numbers kept changing). For some reason, even though the panel wasn't visible, it was obscuring the deck, which is the furthest object to the left. All fixed now!

3
Support / 2 cameras and depth
« on: June 23, 2013, 12:02:15 am »
I am having flaky results using a main camera with cards and a table in perspective mode, and tk2dUI with an ortho camera size 1 for UI only. I am using the 2 UI panels you provided as my starting point. I am using EasyTouch to recognize single clicks on the cards and table. I am also trying to carefully follow the placement of cards and UI elements in the z plane. Both cameras have a z of -10. The table is at .1, and the panels start at 0 and the objects within -.01, etc. as provided. I am placing the cards starting at 0 and going negative a small amount if the card is to overlap another card and be on top.

But the latest odd result is that the card I place (face down) to represent the deck recognizes a click on it to deal the hand, but if I call up the panel and then immediately dismiss it, it no longer responds to a touch. But any other cards already on the table respond ok. Could it be an issue with EasyTouch? I am at a loss on where to look next.

4
Support / Re: Sliced Button Sprites
« on: June 20, 2013, 07:19:59 pm »
But you aren't telling me how to do it. For example, I create a collection and put a 75 x 75 pixel gear icon into it. Then I go to my hierarchy where I had duplicated a basic button from your examples, select the button graphic and instead choose my sprite, which is not sliced. The normal sized button now changes to an image almost as large as the entire screen. So now I am completely confused.

So now I read your response again, and go to your example collection, where I can change the image. So this means I should modify your examples, instead of making new assets? Then I will want quite a few of these. So what workflow do you suggest?

5
Support / Sliced Button Sprites
« on: June 20, 2013, 06:17:22 pm »
I'm really liking tk2dUI, and am making a nice set of panels based on your 2-page example. But how do I replace the button graphics with my own images, using sliced sprites so I don't have to decide on the exact size ahead of time?

6
Support / Checkbox & Radio Buttons
« on: June 09, 2013, 01:07:00 am »
How do pre-set the value I want in a checkbox and radio button? Sorry, I couldn't find a property or function for that.

7
Support / Re: Multiple Sprite Sizes
« on: June 08, 2013, 05:47:08 pm »
Now the monsters are drawing well, and I'm working on a UI panel similar to your demo. Currently I am using EasyTouch for the monsters (to destroy them), and when the panel is called up on top of them they still get the message. I am checking to see if it is in panel mode, but I would like to avoid "dueling touches". Do you have any suggestions?


8
Support / Re: Multiple Sprite Sizes
« on: June 07, 2013, 06:47:56 pm »
Well, now I am completely baffled. I set the collection settings to target height 960, ortho size 5, use tk2dCamera. When I click the check mark, the values disappear. Why is that? I also tried other sizes.

I have a setup scene where I create a single sprite from that collection and place it in the center of the screen. It is about 280 pixels square. Now no matter what I do to the tk2dCamera size, nothing changes. The only way I can get it to change is to "Force Editor Resolution".

9
Support / Re: Multiple Sprite Sizes
« on: June 07, 2013, 05:07:52 pm »
Oh, I finally "get it".


10
Support / Re: Multiple Sprite Sizes
« on: June 06, 2013, 11:49:55 pm »
No. I am adapting to the width of the device, whereas Unity adapts to the height. Then for narrow devices, I might have room to add another row or two of sprites, still leaving a UI area above and below the sprites.

So if I understand correctly, I can scale the sprites uniformly and they will be pixel-perfect if I use the height of the target screen?

11
Support / Re: Multiple Sprite Sizes
« on: June 06, 2013, 10:49:17 pm »
But now I am using all of the real-estate on the device regardless of aspect ratio, by scaling the sprite size to the actual screen width divided by the number of columns chosen. To me, this is much more desirable than having useless margins on the iPad. And then my other question, since I am scaling the sprites dynamically, won't this break pixel-perfect anyway?


12
Support / Multiple Sprite Sizes
« on: June 06, 2013, 08:19:12 pm »
I am doing a monster bubble popper with multiple numbers of columns, from easy to hard. So on an iPad at 5 columns, the sprites are very large. On an iPhone at 10 columns they are quite small. I am using artwork at about 300 x 300 pixels, with no anti-aliasing in the originals, and a small number of colors in each sprite. So far the sprites look surprisingly good on all devices. I am using world coordinates and adjusting the sprite sizes on the fly, and the default target height of 640.

Since the game is always in portrait mode, I suppose I should choose a target height of 960 to get best results on iPhone, and its probably close enough to 1024 for iPad. Then for retina displays and Android devices with more pixels I could use 1920.

So far I am getting identical results with either a perspective camera at 78 or an ortho camera at 8. I presume those will change if I change the target height, no problem. Do you have any suggestions on how to proceed, or am I on the right track?

13
Support / Re: Dynamically Load Collection
« on: May 25, 2013, 11:16:12 pm »
I apologize, it is apparently a problem with Unity 4.1.3. I reverted to 4.1.2, and now debugging works.

14
Support / Re: Dynamically Load Collection
« on: May 25, 2013, 07:47:00 pm »
Hi, I am trying to understand the details of sample #13, and when I set a breakpoint with the Mono Debugger in the function tk2dSpriteCollectionData CreateFromTexture, Unity crashes with "The Debugger is waiting for an expression evaluation to finish, Method: UnityEngine.Object.GetInstanceID".

I am using the latest Unity Pro 4.1.3.

Pages: [1]