Author Topic: Two TweenPosition problems  (Read 9913 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two TweenPosition problems
« Reply #15 on: March 02, 2014, 09:50:21 PM »
NGUITools.AdjustDepth is able to adjust the depth of all widgets underneath the specified target object. So if you specify NGUITools.AdjustDepth(yourButtonGameObject, 1), it will adjust all depths by +1.

The depth should never change the behaviour like you're describing. Depth is only used for two things:
1. Draw order.
2. Event order

So if you had colliders on both the label and the button, the depth would determine which one gets the events. But freezing something in place? I'd have a closer look at the scripts you're using. If you're doing something that results in the button's position changing, then it would explain why it suddenly "freezes" in place if you have another animation on it.

For example -- if you're doing a TweenPosition on the button, and happen to have a UIButtonOffset script attached (which also uses TweenPosition under the hood).

markbsfs

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Re: Two TweenPosition problems
« Reply #16 on: March 03, 2014, 12:23:23 AM »
In my sample project I am not doing anything funny.  I made two prefabs, and used the scripts out of the box.  I have one collider.  The entire project is 60 lines of code, including comments and white space.

If I send it to you, will you look at it?  I'll provide specific instructions to demonstrate the behavior I have described.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two TweenPosition problems
« Reply #17 on: March 04, 2014, 12:09:40 AM »
Yup, certainly -- support at tasharen.com. Don't post it here please.

markbsfs

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Re: Two TweenPosition problems
« Reply #18 on: March 04, 2014, 12:31:19 AM »
Will do.  Thanks

markbsfs

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Re: Two TweenPosition problems
« Reply #19 on: March 04, 2014, 01:41:27 AM »
Thanks for taking a look at my project, ArenMook.

Just to close this out, the problem was I had two widgets attached to one object.  The problem went away, after I moved the UILabel to a child object.