Support => NGUI 3 Support => Topic started by: PoL on May 28, 2013, 09:06:00 AM
Title: How to force "UpdateTransforms" to rebuild geometry on static UIPanel.
Post by: PoL on May 28, 2013, 09:06:00 AM
A have a panel, whose child's are not modified in 99,9% of it's life time. So I decided to make it static. In the rest 0.01% of time, I need to change the transform of some of it's child, but the change isn't visible because the UpdateTransforms() isn't rebuilding the geometry. I did a workaround by adding a method to the UIPanel:
publicvoid ForceUpdateTransforms(){
mWidgetsAdded =true;
}
Setting the 'mWidgetsAdded' flag to true, forces the geometry to be rebuild. Is there any other way to force geometry rebuild (on-demand) on static panel? If not, please add this or something similar to the UIPanel.
Best regards!
Title: Re: How to force "UpdateTransforms" to rebuild geometry on static UIPanel.
Post by: ArenMook on May 28, 2013, 03:01:26 PM
You can always just mark it as not static, then make it static again next frame.