Author Topic: NGUI Unity 2017.3 ScrollRect Support  (Read 5086 times)

ferretnt

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
NGUI Unity 2017.3 ScrollRect Support
« on: January 14, 2018, 04:05:10 PM »
After upgrade to Unity 2017.3, it looks like scrollrects never register clicks anymore (they always interpret drag events), and we have myriad issues with colliders.

Whilst we can debug NGUI to deal with this (and the result will probably still be more usable than the disaster that is official Unity UI with dynamic layouts, endless srolling and integrated 3D models in the UI), it would be great to know if anyone is actively using NGUI with 2017.3, and/or if there will be an official update.

ferretnt

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: NGUI Unity 2017.3 ScrollRect Support
« Reply #1 on: January 14, 2018, 04:07:37 PM »
I should note that Example 14 - Endless Scroll Rect, doesn't work out of the box with 2017.3 using the editor. From looking at the display, I think this is something to do with how screen extents are computed (and seems to be tied to whether the mouse is moving over the gameview.)

ferretnt

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: NGUI Unity 2017.3 ScrollRect Support
« Reply #2 on: January 14, 2018, 05:09:53 PM »
Update2: This is nothing to do with ScrollRect, other than the fact that it looks like Raycasts are screwed up in 2017.3 and the behaviour changes when the mouse is down (!!!) - setting a screen size of fixed resolution in gameView (e.e.g FWVGA Portrait 480x854) rather than an aspect ratio results in everything working correctly.

It sounds liek something similar has happened in the past, based on the comment in NGUIToolscs:1991.

//#if UNITY_EDITOR_OSX
               // There seems to be a Unity 5.4 bug that returns invalid screen size when the mouse is clicked (wtf?) on OSX
               //if (mGameSize.x == 1f && mGameSize.y == 1f) mGameSize = s_GetSizeOfMainGameView();
.