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

Pages: [1]
1
NGUI 3 Support / Re: Dynamic Text on Android Devices
« on: June 24, 2013, 06:15:55 AM »
We're having this issue as well, not just Android devices, happened on my iPhone5 as well, just once though.
Its really hard to reproduce this issue which makes it hard to debug...

Aren said this in another post:
Quote
When the texture's dimensions change, NGUI marks the font as dirty, which in turn forces all labels to refresh their content, which should cause everything to update correctly.

According to Unity's Doc on Font.RequestCharactersInTexture:
Quote
RequestCharactersInTexture may cause the font texture to be regenerated if it does not have space to add all the requested characters. If the font texture is regenerated it will only contain characters which have been used using Font.RequestCharactersInTexture, or using Unity's text rendering functions during the last frame. So it is advisable to always call RequestCharactersInTexture for any text on the screen you wish to render using custom font rendering functions, even if the characters are currently present in the texture, to make sure they don't get purged during texture rebuild.

So its either the font's textureRebuildCallback doesn't get called, or (some of) the labels didn't refresh their content therefore didn't force the font to call the RequestCharactersInTexture?

I'm wondering, instead of calling RequestCharacterInTexture for each labels on the screen, can we call the RequestCharacterInTexture API once and pass the combined string of all the labels? Is it even worth a try?

2
NGUI 3 Support / Re: Change Shader Property
« on: June 02, 2013, 08:50:51 PM »
Hello Galuodo,

    Is it possible to share the alternative solution of yours or perhaps some hints please? Thanks!

3
NGUI 3 Support / Re: Change Shader Property
« on: May 30, 2013, 09:33:44 PM »
Thanks ArenMook

What I have is a HSV shader that can do the Hue shifting, and the UISprite is actually a spriteAnimation using an atlas on its own.
Instead of having the artist to produce different textures for different color variation of the sprites, I thought I can save the product size by using the shader

So I guess if I really need to use different materials I'll have to duplicate both the UIAtlas prefab and the material in the editor and create sprites using the duplicated atlas...
I know it's going to have an extra drawcall but currently the drawcall is still very low so I guess it won't affect the performance for our game...at least not much

4
NGUI 3 Support / Change Shader Property
« on: May 30, 2013, 01:34:46 AM »
Hi,

    I have some properties on the material used by the Sprite that I would like to change by code, but I am not sure where to get the material used by the sprite.
    The sprite.material returns the sharedMaterial but that would change all the sprite used by the same material which is not what I want.
    How should i implement this?

5
NGUI 3 Support / Re: Problem with UIDraggablePanel with Scroll Bar
« on: March 11, 2013, 09:06:00 PM »
Hi ArenMook,

Yes we did, we tried calling UpdateScrollbars, but the scrollbar still doesn't change.
The scrollBar updates correctly only if the panel's clipping mode is Soft Clip.

As for the issue No.2, we managed to fix that by calling the ResetPosition after we re-populate the list instead.

6
NGUI 3 Support / Problem with UIDraggablePanel with Scroll Bar
« on: March 11, 2013, 03:08:10 AM »
Hi,

We encountered two issues regarding the UIDraggablePanel with scroll bar.

We're trying to create a listView with multiple items within it, we used Example 7 as reference to setup our scene.

1)
After we populate the list with items, the scrollBar updates its size accordingly, if we destroy the items one by one within the list, the scrollBar also updates its size automatically.
However, if we delete all the items at once, the scrollBar doesn't change at all.
This only happens when the UIPanel's clipping mode is not Soft Clip.

2)
We called uiPanel.ResetPosition() after we destroy all the item within the list, trying to reset panel's position back to the first position in the list, but it doesn't do what we expected it to do, if we re-populate the list, the list view is still at the position before we deleted the items.

Did anyone else experienced the same issues? Or maybe we're doing something wrong?

Thanks in advance

Pages: [1]