Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: neopickaze on February 16, 2017, 04:21:07 PM

Title: 2D UI Zooming on click
Post by: neopickaze on February 16, 2017, 04:21:07 PM
Hey all,

I'm having some problems working with the sample files on Unity 5.5 running on my 5K retina imac

Whenever I click or scroll the mousewheel or interact in anyway all the 2D components are zoomed in and overscaled which usually means I can't click any of the buttons.

3D seems to be unaffected, apologies if I'm missing some silly configuration to get this to work:

Here's a video showing the behavior
https://www.youtube.com/watch?v=0JCyfFo_ptk

Thanks for your help
Title: Re: 2D UI Zooming on click
Post by: neopickaze on February 16, 2017, 04:56:21 PM
Sorry for double post forgot to add it's NGUI 3.11.1 and I think I'm having this same problem as this guy was:

http://www.tasharen.com/forum/index.php?topic=14748.0
Title: Re: 2D UI Zooming on click retina (unity bug)
Post by: neopickaze on February 17, 2017, 04:48:25 AM
Triple posting now - sorry can't edit :)

Tried the advice in here removing the #ifdef completely, uncommenting the if on line 1959 and nothing seems to make a difference
https://www.tasharen.com/forum/index.php?topic=15015.0

I appreciate it's a unity bug not an NGUI bug, I'll keep playing but any advice in the meantime appreciated :)

Title: Re: 2D UI Zooming on click
Post by: neopickaze on February 17, 2017, 04:54:18 AM
OK forget what I said earlier, it was already commented out in this version 3.11.1 - if I re-enable it all it's better

  1. #if UNITY_EDITOR_OSX
  2.                                         // There seems to be a Unity 5.4 bug that returns invalid screen size when the mouse is clicked (wtf?) on OSX
  3.                                         if (mGameSize.x == 1f && mGameSize.y == 1f) mGameSize = s_GetSizeOfMainGameView();
  4. #else
  5.                                         mGameSize = s_GetSizeOfMainGameView();
  6. #endif
Title: Re: 2D UI Zooming on click
Post by: ArenMook on February 18, 2017, 07:28:14 PM
Please report it as a bug to Unity so they can fix it properly. This hack of mine has side effects.
Title: Re: 2D UI Zooming on click
Post by: greigy on March 22, 2019, 05:26:17 PM
Hi, I am encountering a similar bug, although I cannot use the demo scenes.


What was the name of the script to edit so that I can use nGUI again?