Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: shokinhan on July 29, 2013, 12:50:18 AM

Title: How to order the render material
Post by: shokinhan on July 29, 2013, 12:50:18 AM
My window has a lot of materials. When I open the window. The content panel render before the window's background.

So it look like flickers.

I want first render the background, then render the content, and the content above on the background!

How to reslove the probleam?




Title: Re: How to order the render material
Post by: dlewis on July 29, 2013, 02:53:06 AM
You'll need to tell the panel/s to rebuild immediately by calling Refresh on them or doing a blanket NGUITools.Broadcast("Refresh");
Title: Re: How to order the render material
Post by: shokinhan on July 30, 2013, 12:05:03 AM
I have invoke UIPanel.Refresh() manual. But the UIRoot does not start, so the window looks like very big instant, and then the window would change normal on next frame!
Because of that the UIRoot run after the UIPanel.


If I don't invoke the UIPanel.Refresh, the UIRoot will run after the UIPanel.
If i don't invoke UIPanel.Refresh, the UIRoot will run before the UIPanel.
So the method maybe cause such as contradiction!

How to reslove the probleam ?