Welcome,
Guest
. Please
login
or
register
.
May 06, 2026, 04:53:56 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Is there a way to anchor sprites and make them move with script ?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is there a way to anchor sprites and make them move with script ? (Read 5131 times)
Sahkan
Jr. Member
Thank You
-Given: 9
-Receive: 0
Posts: 74
Is there a way to anchor sprites and make them move with script ?
«
on:
July 08, 2014, 05:27:00 AM »
There is a game i'm working on that need to fit 4:3 and 16:9 screens, and some of the sprites has to move in the game, but when i anchor them, they wont move, is there any way to bypass that ?
Logged
505083367
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 2
Re: Is there a way to anchor sprites and make them move with script ?
«
Reply #1 on:
July 08, 2014, 05:56:13 AM »
your version?
i dont know if you have option in anchors like "Execute", change it to OnEnable;
Logged
Sahkan
Jr. Member
Thank You
-Given: 9
-Receive: 0
Posts: 74
Re: Is there a way to anchor sprites and make them move with script ?
«
Reply #2 on:
July 08, 2014, 06:30:28 AM »
3.5.3
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Is there a way to anchor sprites and make them move with script ?
«
Reply #3 on:
July 08, 2014, 12:23:23 PM »
If you anchor something, then how do you plan on moving it? It's anchored. By definition it will move only if whatever it's anchored to will move.
Some scripts in NGUI are meant to work around this, such as TweenPosition -- it will adjust the anchor' offset for you. You can also move it via code -- NGUIMath.MoveWidget.
Logged
Sahkan
Jr. Member
Thank You
-Given: 9
-Receive: 0
Posts: 74
Re: Is there a way to anchor sprites and make them move with script ?
«
Reply #4 on:
July 08, 2014, 10:33:49 PM »
kk Thanks.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Is there a way to anchor sprites and make them move with script ?