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 ... 7 8 [9] 10 11 ... 17
121
NGUI 3 Support / Re: UITable elements
« on: June 19, 2012, 04:43:03 AM »
Getting the true order is actually quite tricky, as if I recall. They are stored in the order that they are created.

What I did was search for the list once and make a tag.

Then you can just refer to each of your elements as a string instead of an array number.

122
NGUI 3 Support / Re: Getting the example atlas original files
« on: June 19, 2012, 01:30:38 AM »
Thanks for this. I was also thinking of adding a sprite into my atlas to save on a draw call but couldn't because there were no original files. Curse you ArenMook for making such awesome default images ;)

123
NGUI 3 Support / Re: image buttons
« on: June 19, 2012, 01:22:27 AM »
1. It is because there is a UIButton Offset script attached to the button. You should turn it off or change the resize values.

2. Yes.

You could do something (similar) to this using GetComponent.

mymenugui.GetComponentsInChildren<UISprite>()[0].spriteName = "image_name";

124
NGUI 3 Support / OnPress and Drag at the same time?
« on: June 19, 2012, 01:16:03 AM »
Ok, so my UIPanel is draggable, it has button in it. However once you press a button and keep it held down the menu is no longer draggable. I don't suppose it is possible to be able to have the drag feature working at the same time?

125
NGUI 3 Support / Re: Updating before displaying?
« on: June 19, 2012, 12:51:48 AM »
Hmm, annoyingly the problem still exists on handheld devices. Just seemed to fix it on PC and Mac only. :/

126
NGUI 3 Support / Re: How do I get solid color sprite on web browser
« on: June 18, 2012, 04:29:01 AM »
Looks like a filter trying to blend the edges of your single pixel. Perhaps.

Does it work if you set the properties of the Import setting to "Filter Mode : Point" instead of Bilinear/Trilinear?

127
NGUI 3 Support / Re: Updating before displaying?
« on: June 18, 2012, 04:21:43 AM »
Thanks guys. That did the trick :)

I've been looking at that slight resizing issue for well over a month now and I kept thinking, I am going to fix that one day. And then just pasting "NGUITools.Broadcast("Refresh");" after my instantiate and it suddenly works. Great stuff thanks :)

128
NGUI 3 Support / Updating before displaying?
« on: June 17, 2012, 09:36:34 PM »
I have a problem now where when I first create my menu. There is about a 0.25 delay before it correctly adjusts to its proper size.

I am using

GameNGUI.GetComponent<UIRoot>().automatic = false
GameNGUI.GetComponent<UIRoot>().manualHeight = Screen.currentResolution.height;

but there is a noticable delay before the menu gets resized properly. Is there anyway to easily stop the menu from appearing on screen until it has been resized?

129
NGUI 3 Support / Re: Manual refresh of UIPanel?
« on: June 14, 2012, 09:41:19 PM »
By the way, an update. (I forgot about this thread)

Suddenly my gfx of the UISlider came out corrupted, everything turned into squares, I couldn't figure that problem out either. So I rebooted my PC and guess what? All my problems were magically solved?!.... so in the end I didn't even need the refresh option. Everything is working ok now.

Have no idea what was going on there.

130
Something just caught me out. Ok, so I was going through my objects using GetComponentsInChildren<UIFilledSprite> and I decided to add 2 UISprites in the intention that I could simply get at them quickly with

GetComponentsInChildren<UISprite>()[0]

etc.

Until I found out that no matter which I search for, both types of sprites are in the same list. Is this normal behaviour?
I am thinking that this is a feature.

131
Do you have a test screen from your NGUI that we can take a look at that?

Click on the panel tab in the Inspector window.

How many drawcalls are there? Widgets? etc. Is Depth Pass switched on?
Would be interesting to know many triangles you are using etc.

132
Try turning all of your alpha OFF, and leaving the UIPanel as it is. I think you will find a big speed increase.

If you have a bg with alpha, then a UIPanel with alpha and your widgets with Alpha, that is a whole lot of fillrate used before you even use UIPanel.

We had terrible slowdown on the iPhone4 when a menu appeared, so I turned all the alpha off and it was much much faster. I am still convinced it is the fault of the shader, you are using Unity's mobile shaders right and not the default Unity ones?

You might want to also make sure you are only using 1 atlas on your NGUI. Multiple atlases == lots of drawcalls too.

133
I don't why you are having so much slowdown. I can't help feeling that the problem might be elsewhere.

What platform is this on? Are you using alpha already on your objects?

I had slowdowns on iPhone4 because it is has a very poor fillrate.

134
NGUI 3 Support / Re: Multi touch OnDrag ?
« on: June 13, 2012, 11:52:55 PM »
Is this using UIPanel? Or using the inventory screen tutorial?
With UIPanel I can't really see why you would want to do that. If it's the inventory screen, I can't see why that wouldn't be possible. But again, why would you want to drag two things at once? Or is it part of a game design? :)

135
You 'might' want to have a look at UIFilledSprite because using that you would be able to limit the Fill amount of a certain sprite in the Horizontal direction. In that way you could calculate manually yourself how far a sprite is off the panel and clip it yourself.

[Edit]

Does setting the softness to 0 in UIPanel improve performance?

Pages: 1 ... 7 8 [9] 10 11 ... 17