Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: peaj on October 16, 2014, 03:09:21 AM
-
I'm trying to disable the repositioning animation when the aspect ration changes.
On ratio change the Sprites should be instantly positioned at the right place and not move there
smoothly. Is there any way to deactivate it?
Best regards,
Pascal
-
Reposition animation of what?
-
I mean the repositioning of every anchored UIWidget.
Our UIButtons for example are anchored to the left or right of the UIRoot.
If you start the scene with another resolution than it has been designed with,
the buttons slide to the side until they reach their anchored position.
They shouldn't slider there but just instantly be placed at the anchored position.
-
NGUI doesn't animate anchors smoothly like that. I suggest you examine what else you have on those widgets -- such as tweens.
-
There are no tweens or anything similar.
The Layout consists of:
Buttons (UI2DSprite, UIButton, Box Collider)
Anchored to Widget (UIWidget)
Anchored to Root (UIRoot, UIPanel, Rigidbody)
All anchors are set to OnUpdate.
UIRoot is set to constraint on height.
Could it be that the Sliding comes from NGUI needing several
update cycles to solve the anchors?
-
It shouldn't. Anchor updates are hierarchical -- dependencies are always updated first.