Author Topic: How to force "UpdateTransforms" to rebuild geometry on static UIPanel.  (Read 2106 times)

PoL

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
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:

  1. public void ForceUpdateTransforms() {
  2.         mWidgetsAdded = true;
  3. }

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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
You can always just mark it as not static, then make it static again next frame.