Author Topic: ScorllView problems  (Read 13015 times)

wangzy_88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
ScorllView problems
« on: July 08, 2015, 07:30:42 AM »
1"Cancel Drag If Fits" is useless sometimes,Log show is float precision problem.

2 If use ScrollView+Grid,the first item can't click, change ScrollView+Table will fix it.
I use BoxCollider2D and UICamera's Event Type set "2D UI".UIDrag ScrollView and its BoxCollider2D is ScrollView's parent.3.7.x has no problem,now I use 3.9.0b.

wangzy_88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: ScorllView problems
« Reply #1 on: July 09, 2015, 07:24:13 AM »
Why ignore my post...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScorllView problems
« Reply #2 on: July 12, 2015, 07:51:07 PM »
Because I don't understand what you posted.

wangzy_88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: ScorllView problems
« Reply #3 on: July 24, 2015, 12:11:46 AM »
Sorry for my bad english...

1"Cancel Drag If Fits" is for scrollview can't be filled with items solution,but sometimes scrollview still can drag one time,I print log show panel's clip in shouldMove param is different.For example,it's y may be 0.99999 or 1.00001.

2 If I use UIGrid,the first item can't click sometimes,change UITable will be ok.If can't click, change BoxCollider2D on item will fix it,seem like UIDrag ScrollView's collider cover item's collider.

Thank you very much.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScorllView problems
« Reply #4 on: July 24, 2015, 10:51:55 AM »
1. I think I know this one... if I think of a good fix, I'll patch it on my end -- but you can suggest a fix if you have looked into it on your end.

2. UITable just positions children, it won't break the ability to click on something. If you are using 2D colliders, due to how Unity works it may not be possible to click on small 2D box colliders unless you get rid of UIRoot with its small scale (or just set UIRoot's size to 1).

wangzy_88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: ScorllView problems
« Reply #5 on: July 25, 2015, 04:13:52 AM »
1.Check position when items create,change it if deviation is small enough.

2.How to change UIRoot's size?I see it's scale will check on Update.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScorllView problems
« Reply #6 on: July 27, 2015, 08:11:53 PM »
Change the UIRoot to be constrained and just set the height to 1.

wangzy_88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: ScorllView problems
« Reply #7 on: July 29, 2015, 06:45:59 AM »
Thx for reply,I change UIRoot scale but have no help.

I understand the second problem,it's because of the parent of scrollview which I add UIDragScrollView don't have a UIComponent,so NGUI can't handle it's collider's depth.
I decide to use collider3D and change it's center's Z to solve this problem.But I still don't understand why UITable is ok.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScorllView problems
« Reply #8 on: July 31, 2015, 09:29:18 PM »
Use invisible widgets.

ALT+SHIFT+W.

wangzy_88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: ScorllView problems
« Reply #9 on: August 01, 2015, 06:53:30 AM »
Thx,I will try.

wangzy_88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: ScorllView problems
« Reply #10 on: August 04, 2015, 04:16:13 AM »
It's a very useful solution.