Welcome,
Guest
. Please
login
or
register
.
February 12, 2025, 07:05:19 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How To Set Anchors At Runtime?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How To Set Anchors At Runtime? (Read 2941 times)
play_edu
Newbie
Thank You
-Given: 10
-Receive: 0
Posts: 21
How To Set Anchors At Runtime?
«
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
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: How To Set Anchors At Runtime?
«
Reply #1 on:
November 06, 2014, 02:16:35 AM »
UIRect.SetAnchor, or manually set each -- uiRect.leftAnchor.Set, etc.
"Unified" simply means all 4 anchors (left, right, top, bottom) use the same target.
Logged
play_edu
Newbie
Thank You
-Given: 10
-Receive: 0
Posts: 21
Re: How To Set Anchors At Runtime?
«
Reply #2 on:
November 07, 2014, 11:57:14 PM »
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
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: How To Set Anchors At Runtime?
«
Reply #3 on:
November 09, 2014, 08:53:08 PM »
So do just that. uiRect.SetAnchor(null), or individually -- uiRect.leftAnchor.target = null;
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How To Set Anchors At Runtime?