Author Topic: TweenHeight bug with multiple activations  (Read 2386 times)

AmaroK86

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
TweenHeight bug with multiple activations
« on: February 25, 2014, 12:00:52 PM »
Hi all, I've been using the new 3.0.7 version and I'm trying to create a menu with 4 containers that expand and shrink when clicked. I've noticed that when they are anchored from top to bottom and then I try to click on multiple panels when there are multiple tweenheight activated, the position of the current clicked panel stops to follow the upper panel and stays on a fixed position. I want that they keep following the upper panel with the same distance I have declared on the inspector. Is that a bug or something? Thanks in advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TweenHeight bug with multiple activations
« Reply #1 on: February 25, 2014, 01:10:02 PM »
You need to update to the latest version. There were changes added in a more recent version that make tweens work with anchors.

AmaroK86

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: TweenHeight bug with multiple activations
« Reply #2 on: February 26, 2014, 03:59:25 AM »
Thanks for the quick response. I downloaded the latest version, replaced the NGUI files and rebooted Unity many times but nothing changes. I have simiplified the problem to only 2 sprites, one top and one bottom, anchored the bottom one to the top sprite and set the tweenheight toggle on the button's onclick function.
Explaining it it's hard for me, maybe a very simple Unity project will explain what I'm talking about, here's the link:
I would be very thankful if you can resolve this issue or explaining what I'm doing wrong or what's an alternative solution for this problem.
Thank you
« Last Edit: February 26, 2014, 01:55:28 PM by ArenMook »

AmaroK86

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: TweenHeight bug with multiple activations
« Reply #3 on: February 26, 2014, 05:20:43 AM »
I came up with a "patch" solution that behaves exactly like I want. I removed the anchor and apply a little script that reallocate position from the top sprite using the update function

It works, now when I press multiple sprites they stretch while being anchored with upper ones with a fixed distance.
I'd love to see such behaviour implemented in a future version of NGUI, can it be done easily?
« Last Edit: February 27, 2014, 03:32:05 AM by AmaroK86 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TweenHeight bug with multiple activations
« Reply #4 on: February 26, 2014, 01:55:50 PM »
If you want my help, start by not posting NGUI's source code on a public forum.

AmaroK86

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: TweenHeight bug with multiple activations
« Reply #5 on: February 27, 2014, 03:36:00 AM »
I'm sorry, it was my bad and I apologize. I just wanted to help other guys that may have the same problem. I think that NGUI is a great UI for Unity and the better it behaves ,more it will be used and perfectioned. ;)
Keep up the good work!
« Last Edit: February 27, 2014, 03:54:00 AM by AmaroK86 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TweenHeight bug with multiple activations
« Reply #6 on: February 27, 2014, 05:32:32 PM »
No worries. You are welcome to post the files you've modified, just not NGUI in its entirety.