Author Topic: Table inside a scrollview inside a tweenScale go, inceptbug?  (Read 5476 times)

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Table inside a scrollview inside a tweenScale go, inceptbug?
« on: January 03, 2014, 09:42:09 AM »
Hi Aren,

I notice a weird behaviour when you have table inside a scrollview (vertical for me) inside a gameObject with a tweenScale script attached to it (for a pop-up process for example).
When this pop-up appear (scale 0 -> 1), if your mouse is hover one of the table's items, they shake (long duration) or they appear much bigger than they should until you click on one of them (short duration).
I think this is very easy to reproduce :)

I hope you can fix it!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #1 on: January 03, 2014, 09:59:34 AM »
Scale of 0 is invalid. You can't divide by zero, so you can't calculate the inverse transformation matrix properly. Never use zero scale. Use a small value instead such as 0.01f.

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #2 on: January 03, 2014, 10:30:42 AM »
All right, but that did not solve my problem... It's very noteworthy with a duration of 0.1!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #3 on: January 03, 2014, 11:11:36 AM »
What's your hierarchy exactly?

GameObject (tween scale)
- Scroll View
-- Table
--- Object 1
--- Object 2
...etc?

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #4 on: January 03, 2014, 06:44:23 PM »
Yep exactly! With an UISprite on every object in the table.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #5 on: January 04, 2014, 09:44:12 AM »
Here's what I tried...

1. New scene.
2. Dragged in two Colored Button controls.
3. Right-click, create Scroll View.
4. Add a child game object to the scroll view (ALT+SHIFT+N), attached UITable to it.
5. Reparented colored buttons to the table object.
6. Changed table to use 1 column, execute to position the buttons properly.
7. Attached TweenScale to the Scroll View object, set it to scale from 0.1 to 1.0.

When I hit Play, everything worked as expected. The scroll view tweened from 0.1 to 1.0 on start and buttons scaled properly on hover during and after tween. What are you doing differently?

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #6 on: January 06, 2014, 03:35:31 AM »
Well the problem do occur when i recreate a scene as you did!
Just set the tween duration to 0.1, start play in the inspector and place your mouse hover the first button (before the scene is actually started), and sometimes (depend on mouse position i guess), the button(s) will be displayed bigger than they should until you move your mouse and "re-hover" them.
(I'll post a video if you can't recreate that behavior).
Thanks!

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #7 on: January 07, 2014, 11:21:52 AM »
Here you are: http://videobam.com/ygaHX (the quality is bad as shit, but as i do exactly what you describe above, it should be ok)

You can see the elements' scale problem for a 0.1s duration of tween scale, then i tried the elements' shake problem for a 1s duration, but it was not very effective with the buttons actually (but it happens with more complex elements!)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #8 on: January 08, 2014, 01:37:27 PM »
Your video doesn't load. May I suggest using youtube instead? Also, is this an editor-only issue?

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #9 on: January 09, 2014, 03:57:27 AM »
http://www.youtube.com/watch?v=KqQW15dQU2o

And nope, i tried a web player build, it also happens... Ty

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #10 on: January 09, 2014, 07:17:40 PM »
Unfortunately I won't have a chance to take another look (or to even watch that video) until I'm back home where wifi is not of dialup quality.

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #11 on: January 12, 2014, 08:10:48 AM »
UP :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #12 on: January 12, 2014, 05:39:47 PM »
Bumping it on the 16th would be much more helpful. ;)

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #13 on: January 20, 2014, 08:26:55 AM »
I'm bumping it on the 20th!

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Table inside a scrollview inside a tweenScale go, inceptbug?
« Reply #14 on: January 22, 2014, 05:38:30 AM »
And on the 22th...