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

Pages: [1]
1
Thank you for your response Aren. 

Best approach would be to create a custom widget that will draw the 4-5 sprites at once in one draw call by giving it a custom OnFill function. Since it will all be one widget drawing the several sprites together, they will always move as one and you won't get any visual artifacts.

Is there a video or resource where I can learn more about creating that costume widget? 


That said, I am not sure why you are seeing the 1 pixel offsets to begin with. If nothing is scaled, there shouldn't be any glitches.

I'm not sure either... but I guess they are being scaled because the sprite is a small black square I sliced and I use it to cover most of the screen... This is driving me nuts.

Love NGUI by the way... it's saved me TONS of time.  THANKS

2
NGUI 3 Support / Small Glitch when Resizing Sprites... How can I fix it?
« on: September 28, 2015, 02:13:59 PM »
Hello,

I have a few dark semi-transparent sprites that are anchored to other sprites.  The idea is that these semi-transparent black sprites darken the entire screen except for the area I want people to pay attention to.

Think of it this way:  I have the sprite I want to make people notice, and I surround it with sprites on top, left, right and bottom.  Then I anchor the top of the top sprite to the top of the screen and  the bottom to the top of the sprite I want to highlight...  The sprite on the left gets anchored left side to the left of the screen and right side to the left of the sprite I'm highlighting and so on.

The problem comes when one of the highlighted sprites is moving (for example in a scroll view) I get small 1 pixel glitches that show the "break" between the different see-through sprites.

Is there a better approach to this?  Is there a way I can make sure the anchoring goes to the same pixel so that there is no 1 pixel gap sometimes?

Thanks in advance for your help!

3
NGUI 3 Support / Re: Font.CacheFontForText Causes Lag - NGUI Fonts
« on: February 18, 2015, 12:25:14 PM »
Thanks for the reply.  In my case, I had the Debug option of the NGUI camera turned on... When I turned that off the problem went away.

4
NGUI 3 Support / Re: Draggable Item barely moving
« on: February 17, 2015, 06:27:19 PM »
Have you checked if the item is anchored OnUpdate?  I had a similar issue where my anchor was fighting the dragging.

5
NGUI 3 Support / Font.CacheFontForText Causes Lag - NGUI Fonts
« on: February 17, 2015, 06:22:24 PM »
Hello, I have all my labels using NGUI Fonts (not dynamic) yet I'm seeing a huge lag on the first time my label get updated.  In profiler I'm seeing Font.CacheFontForText to be the culprit.

Since I'm not using anything but NGUI Font, I'd like to know what could be causing the font texture to be re-written causing this lag.  PLEASE HELP!

6
NGUI 3 Support / Slider - Fill a Sliced Sprite?
« on: January 27, 2015, 01:05:58 PM »
Hello,

I'm making a progress bar.  It has rounded corners.  I'd like to have it stretch for multiple resolutions like a sliced sprite, but I want the slider to fill rather than stretch.

I saw this question asked before where the person illustrated as follows:

Full Bar:   ((-------------))
Lower:     ((-------------)
Lower:     ((-------------

So the rounded corners look good when it starts, but as the health decreases the slider "unfills".

The only solution I've found so far is to have a BIG sprite that covers the entire length of the bar and set it as filled, but that doesn't allow for my health bar to shrink and expand for multiple resolutions and it uses unnecessary texture space in the atlas.

Any ideas will be very much appreciated.

Pages: [1]