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

Pages: 1 2 3 [4] 5 6 ... 17
46
NGUI 3 Support / Re: Straight Lines?
« on: September 21, 2012, 06:00:35 AM »
Cheers for the advice Arenmook. I got it all working now :)

47
NGUI 3 Support / Re: Yikes, can't Select UIAtlas
« on: September 09, 2012, 01:59:34 AM »
I have noticed that the list is a bit odd, sometimes an atlas that I was just using doesn't show (even before the list got bigger than the screen). That area of Unity seems a bit flakey at times.

Even when I restart Unity the list is always full.

I'll check it out, thanks as ever for your invaluable first hand help ArenMook. :)

48
NGUI 3 Support / Re: Yikes, can't Select UIAtlas
« on: September 09, 2012, 01:54:03 AM »
So I guess then, there is no solution then, when you have lots of atlases in a project? (even if they are unused)

49
NGUI 3 Support / Re: Changing an Atlas assigned to a UISprite?
« on: September 09, 2012, 01:27:03 AM »
Aah, that would make sense. I searched and found that video tutorial. Thanks for that :)

50
NGUI 3 Support / Re: Yikes, can't Select UIAtlas
« on: September 09, 2012, 01:25:58 AM »
We have lots of various atlases for different platforms due to size issues, and also various gfx sets used for reskinning.

Obviously we are not using them all at once, as that would be crazy.

However they all exist within the same project, which means I can't select an atlas sometimes because there is no scrollbar to get at it.

51
NGUI 3 Support / Re: Changing an Atlas assigned to a UISprite?
« on: September 08, 2012, 08:32:30 AM »
Ok, fixed it now. That is a weird one.

Seems all I needed was

mySprite.atlas = myAtlas2;

Not sure what replacement does but it didn't seem to do anything for me.

52
NGUI 3 Support / Changing an Atlas assigned to a UISprite?
« on: September 08, 2012, 07:41:33 AM »
How do I do this?

So far I have assigning new sprites in an atlas. Using something like this:-

mySprite.spriteName = "other_sprite_name";

This all works but now I want to do something like this.
mySprite.atlasName = "other_atlas_name";

I have searched around on this forum and found .replacement

But I can't seem to get it to work. I have loaded two atlases like this:-

UIAtlas myAtlas1 = Resources.Load("mydir/myAtlas1", typeof(UIAtlas)) as UIAtlas;
UIAtlas myAtlas2 = Resources.Load("mydir/myAtlas2", typeof(UIAtlas)) as UIAtlas;

Then I call my atlas change.

mySprite.atlas.replacement = myAtlas2;


However if I debug the atlas (mySprite.atlas), it is still pointing to myAtlas1.

Am I missing something obvious?

53
NGUI 3 Support / Yikes, can't Select UIAtlas
« on: September 08, 2012, 06:16:30 AM »
Not sure if this is a problem with Unity but the "Select UIAtlas" "List of recently used components box", it has no scrollbar...

I can extend the window to the height of my screen resolution but now I have more atlases than I can fit on the screen. And since there is no scrollbar there now, atlases missing off the bottom I can't select.

Is there any way around this?

54
NGUI 3 Support / Re: Unity freeze with NGUITools Refresh
« on: September 06, 2012, 08:50:30 AM »
I am not sure, perhaps. What scared me a bit is that this occured in some code I wrote last month, and then the freezing suddenly appeared there. Need to do some more investigating first.

Thanks for the answer, ArenMook :)

55
NGUI 3 Support / Unity freeze with NGUITools Refresh
« on: September 06, 2012, 05:13:33 AM »
My program starting freezing, Unity completely froze and made it so I had to CTRL+ALT+DEL.
Finally tracked the fault down to

NGUITools.Broadcast("Refresh");

If I remove this line, my program no longer freezes. I am not sure exactly what is happening but I can only assume that maybe I have too many children in my UnityObject?

56
NGUI 3 Support / Re: UILabel Line Spacing?
« on: September 04, 2012, 04:12:53 AM »
I see, well that's a shame.

Would have been cool to be able to specify the Line Width, Line Count and then the "Spacing Height" (in world coordinate pixels) affecting only that particular UILabel.
A positive number increases the distance between the next line of text and then a negative number reduces the distance between the next line of text. Then I would be able to put in "Spacing Height : -3"

57
NGUI 3 Support / Re: sorting the elements in the grid?
« on: September 04, 2012, 01:14:44 AM »
Thanks for that link, made for interesting reading. This was a similiar situation I was having, duplicating a list of items in code. The order was unpredictable, as was reposition. On iPhone the contents were backwards.

As a 'quick' fix I resorted to sorting them manually myself just to be sure they would work across all platforms.

Unity seems to be particularly random at sorting created items any. You only have to do a GetComponentsInChildren search on a menu object and see the order stuff is sorted in. It makes for interesting peeking.

58
NGUI 3 Support / Re: UILabel Line Spacing?
« on: September 04, 2012, 01:10:22 AM »
You mean that I can adjust the spacing in the Inspector somewhere? Not entirely sure where that is, but what it sounds like is adjusting the global setting for the font spacing.

If I do that it will change the line spacing in all areas of my program for that particular font though.

59
NGUI 3 Support / UILabel Line Spacing?
« on: September 03, 2012, 11:38:06 PM »
Is there anywhere to adjust vertical line spacing?
If I have UILabel, the text string when it goes onto the next line, it is a quite a big step in most cases. Presumably the line spacing is determined by the maximum height of the biggest height character.

Is there anyway to adjust this? Up till now I have been positioning 2 or 3 UILabels close together to get around this issue. But I am beginning to wonder if there is a better way?

60
NGUI 3 Support / Re: Straight Lines?
« on: September 03, 2012, 10:41:34 PM »
Ok, I think I get it, I will have a test later.

I am going to will make a 4x4 sprite like this

O = White Pixel

X = Transparent Pixel

OXXO
OXXO
OXXO
OXXO

And then a sliced sprite with a 1 pixel border on two of the 4 sides (presumably the sides where there are pixels), and with "fill center" disabled.

Thanks :)

Pages: 1 2 3 [4] 5 6 ... 17