Hi everyone.
I’m having an issue with resizing UI elements from code:
I have hardcoded positions for anchors and margins for and want to switch inbetween on certain events (like growing/shrinking a minimap on click)
The issue is, after setting the anchor and margins for the Element, it doesn’t resize only on window resize…
Is there an equivalent like in Unity, LayoutRebuilder.ForceRebuildLayoutImmediate?
Thats a quite usefull information
I’ve tried so hard make a UI-button blink to give the player some oriantation
with scale() and it never worked. So ended up in changing color, translate for and back
or point an arrow to it. Now everything makes sense again… thanx
Sorry for reviving a very old thread, but I ran into this same issue today and was wondering if there is any new solution for this by now, other than the workaround suggested by Yaustar?
To be more precise: we are trying to set the margin of an element via code, but the element does not update it’s appearance until we force an update of the entire screen with the above workaround.