Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: play_edu on November 06, 2014, 12:31:46 AM
-
Hi,
How To Set UI Sprite or Widget(UI Rect) Anchors At Run time ? Like Set Anchors (None),Set Anchors (Unified) or Set Anchors (Advanced). I can't Access This Properties.
Best Wishes,
Play_edu
-
UIRect.SetAnchor, or manually set each -- uiRect.leftAnchor.Set, etc.
"Unified" simply means all 4 anchors (left, right, top, bottom) use the same target.
-
Thanks for ans.
I have a sprite set anchor but i want make it null at runtime , like anchor type none.
best wishes,
play_edu
-
So do just that. uiRect.SetAnchor(null), or individually -- uiRect.leftAnchor.target = null;