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

Pages: [1]
1
Hi,

I'm trying to make a very simple utilisation of UITweener and onFinished delegates.

Basically, I am scaling down a dialogue window. Once I receive the onFinished delegate (which I called FadeOutDone), I check to see if I have more dialogue lines to display. If so, I must scale back up, and would like to have a new onFinished delegate called FadeInDone.

However, since the delegates are "backed-up" and restored by the UITweener class, this code cannot work, even though I feel like it should be legal. I could use always the same delegate (FadeDone) but the code would not be as clean. I could also use the deprecated callWhenFinished system, which I'd like to avoid.

Is there a clean way to do this with the current system?

Why are delegates backed up, cleared and restored by the UITweener?

Thanks.

2
NGUI 3 Support / Re: Slow frames when enabling panels with many widgets
« on: January 24, 2014, 03:23:02 PM »
Well, in our case, most widgets will always have the same parent.

I was thinking of adding a parameter on panels or widgets, something like "rememberParentPanel". The widgets could still call "RemoveFromPanel()", which would clear the actual "panel" pointer. But when looking for the parent later on (when the panel and widgets are enabled again), if we have rememberParentPanel and the panel has been seen before, we could avoid calling FindInParents and simply setting the panel pointer to the last valid value.

Do you see any problem with such a solution?

3
NGUI 3 Support / Slow frames when enabling panels with many widgets
« on: January 21, 2014, 04:22:56 PM »
Hi,

We are currently using version 3.0.8 f7 and have one performance issue we are not sure how to fix.

The way our menus work is that each menu has its own panel. When we switch between menus (e.g. chapter selection to level selection), we disable the panel object of the previous menu (base object of the menu) and enable the next one.

For our level selection menu, we have about 720 widgets on 4 different pages, for a total of 4440 triangles.

When we display this menu, there is a slow frame which is in part caused by the following calls:

- UIRect.OnEnable -> ... -> UIWidget.CreatePanel -> UIPanel.AddWidget (11.1% of the frame)
- UIRect.OnEnable -> ... -> UIWidget.CreatePanel -> UIPanel.Find (10.0% of the frame)

This is normally calculated on start, but when panels are disabled and enabled again, widgets are dissociated from their parent panel (RemoveFromPanel()).

Is there something wrong in the way we use NGUI? Would it be possible to avoid removing widgets from their panel when they are disabled and enabled again?

Thanks a lot!

Pages: [1]