Author Topic: 2D UI Zooming on click  (Read 6015 times)

neopickaze

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
2D UI Zooming on click
« 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

neopickaze

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: 2D UI Zooming on click
« Reply #1 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

neopickaze

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: 2D UI Zooming on click retina (unity bug)
« Reply #2 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 :)


neopickaze

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: 2D UI Zooming on click
« Reply #3 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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2D UI Zooming on click
« Reply #4 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.

greigy

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: 2D UI Zooming on click
« Reply #5 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?