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 - TokyoDan

Pages: 1 2 [3] 4
31
NEVERMIND. I found the solution here: http://www.tasharen.com/forum/index.php?topic=7125.msg33674#msg33674

I just upgraded from 2.7 to 3.0.8 without many problems. There is one left I can't solveā€¦

I used to dynamically color my text in script like this:

aUILabel.text = "[00a2ea]I am [00a2ea]Joe";   // "I AM" is red, "Joe" is light Blue

While the color of "Joe" is light blue as expected,  "I am" is displayed as black.  I can't get it to display in red. What has changed?

32
NGUI 3 Support / Re: Atlas Switching script
« on: September 20, 2013, 07:15:27 PM »
Thank you Nicki. I got it figured out and everything works now. Funny thing is I added another UI and forgot how I set it up a fe months ago when it was working so I dug out an old backup and compared what I  did before. It was the  UIRoot was set to at pixel perfect instead of FixedSizeOnMobiles.

33
NGUI 3 Support / Re: NGUI 3.0
« on: September 20, 2013, 12:19:26 AM »
So where can we get this. It's not in the Asset Store?

34
NGUI 3 Support / Re: Can't use UILabel for status messages
« on: September 19, 2013, 11:18:12 PM »
Thanks.

35
NGUI 3 Support / Atlases are properly replaced but sizes do not change.
« on: September 19, 2013, 08:54:51 PM »
Atlases are properly replaced but sized do not change.

I had a similar problem before with sliced spites but that was because I had the atlas pixel sizes set wrong: http://www.tasharen.com/forum/index.php?topic=5181.msg24795#msg24795

This time I have the pixel sizes set right BUT ALL sprite AND UI elements do not scale.

I am using NGUI 2.7.0.

1. I have an 40x40 sprite in "SDAtlas". Atlas Pixel Size = 1
2. I have an 80x80 sprite in "HDAtlas". Atlas Pixel Size = 0.5

3. I have "MainAtlas" setup as a "Reference" Atlas Type and it points to "SDAtlas".
4. I use the Widget Tool to create a Sprite in the Scene using "MainAtlas".

The sprite is 40x40

I can see that the SD and HD atlases are properly swapped depending on how big I make my Game window (set to Free Aspect). But. The sprite size never changes... it is locked to 40x40:

When "SDAtlas" is swapped in, the 40x40 sprite is displayed correctly at 40x40.
But when "HDAtlas" is swapped in, the 80x80 sprite is displayed but it scaled down to 40x40.

Why,

Shouldn't it be 80x80 so that when looking at it on a HD screen it will look to be the same relative size as a 40x40 sprite on a SD screen?

36
This problem is back I can select the "Sliced" drop-down menu item from Sprit Type in the Inspector but the handles that allow you to adjust the edge margins do not appear.

This problem showed up in last version of NGUI Pro before that last update. And I just updated today to the latest version in the Asset store but it doesn't fix the problem. And I on Unity 4.2.1 which I updated to a few weeks ago.

I think Unity 4.2.1 may have broke NGUI sliced sprites because the last time i made sliced sprites they were OK and I was on Unity 4.1.x.
----------------------
Please disregard the above. I was doing it wrong. If anyone has the same problem here is the way to do it right:

http://www.tasharen.com/forum/index.php?topic=5669.msg26900#msg26900

37
I sure wish I could get some help here.

38
Hello.

I'm trying to use the list functionality of the "Example 9 - Quest Log" to display list of game rooms on a multiplayer server. I got rid of everything in the scene that wasn't necessary to handle the list and the interactivity of clicking on list items. And it still works...clicking on the title of a list item tweens the description in and out. This is fine but...

I see no colliders anywhere, how is each list item (Label) picking up the clicks that causes the tween?

39
TNet 3 Support / Re: Channel List Tutorial Pt 2- Player Name List
« on: August 24, 2013, 10:00:31 PM »
Hello, I downloaded the packages for both tutorials imported NGUI & TNET and your unitypackages and loaded the scenes, but it is empty...no buttons display (although I can see what looks like a wireframe layout in the Scene window.

I'm using the latest versions of everything (Unity, NGUI, TNET).

Regards,
Dan

40
NGUI 3 Support / Can't use UILabel for status messages
« on: August 05, 2013, 10:14:39 PM »
I'm trying to use a UILabel to display status messages. 

    public UILabel messageLabel;
    messageLabel.text = "This is a status message";

But the second time I try to set the .text field it just superimposes the 2nd message over the previous message without clearing out the text that was there before. Even trying to null the .text field or using an empty string before trying to change the .text field doesn't work.

    messageLabel.text = null // or "";
    messageLabel.text = "This is the 2nd status message";

How do I clear out the previous text so I can cleanly display new text?

41
ArenMook, I fixed it! I had the darn atlas Pixel Sizes backwards. 1, 2, and 4, instead of 1, 0.5, & 0.25. That was the one thing I forgot to mess with to fix my problem and it just occurred to me this early morning in Tokyo. But if all of the buttons and fonts had been wrongly sized that would have been the first thing I would have looked at.

Thanks and sorry for the trouble.

BTW. All your stuff is great, and your tutorials too! I bought NGUI, TNET, and about to buy the UI Starter Kit: Starlink.

42
Here's what they look like. Notice that everything is scaled perfectly except for the button background (sliced sprite) in the SHD version.

https://www.dropbox.com/s/8lho11v3ljqcf2m/SD.PNG

https://www.dropbox.com/s/on3c5njc2dsu8a9/SHD.PNG

43
Have you set proper borders in the HD atlas on the sprites you use as Sliced? My guess is: no. :)

Of course I did. That was the first thing I did...in all three atlases. I layed out my UI with the reference atlases and forgot to mention that the SD version of the sliced sprite works as it should but the sliced sprite doesn't work when the HD and SHD atlases are swapped in.

44
I got NGUI setup to switch between SD,HD, & SHD atlases and fonts. Almost everything is working perfectly. Labels and buttons use the appropriate atlas and are the correct size corresponding to the device I run it on. But sliced sprites are not working. I setup one sprite in each of the SD,HD,SHD atlases as a sliced sprite. I create my UI using the SD atlas. But the sliced sprite is OK only when running on the device that pulls in the SD atlas. When a HD or SHD atlas is pulled in the sliced sprite looks like it is just a stretched, unsliced version of the sprite in the SD atlas although I can see from Debug.Log and actually stepping through the code that the proper atlas is being used.

This also happens in the editor. If I run the project with the Game Window set to NOT maximize on play the SD atlas is used and the sprite is properly sliced. But if I run the project with the Game Window set to maximize on play the HD atlas IS USED BUT the sprite is NOT properly sliced. (All the labels and buttons are properly scaled and displayed in each case.)

While labels and buttons are created via the Widget Tool, Sliced Sprites are created via the NGUI->Create a Sprite menu. So something weird is taking place. And when I create a sliced sprite I make sure that it is using my reference atlas and not the actual SD, HD, SHD atlases.

What am I doing wrong or what else needs to be done?


45
I got the script working by adding more similar variables to hold the additional size fonts.

Sounds like that script was written to work with one font at a time, so you have to either use 3 instances of it, or create a combo script that has more fields.

Pages: 1 2 [3] 4