Closed lamara closed 4 years ago
Ouch, that is very bad :| I will investigate tomorrow but it seems an internal Unity bug. What version of Unity are you on? EDIT: Made the gif bigger and saw it, 2019.3.14. Will investigate on that one.
Thanks for the quick response!
I'm on Unity 2019.3.14f1.
So the problem is indeed Unity's, which returns the wrong pixel coordinates for the mouse position in the editor (divided by two as you mentioned in case of 200% scaling, meaning it returns the mousePosition as if the UI wasn't scaled at all :|). I'm trying to find a workaround for that :P
Ok I managed (had to hack into Unity because apparently there is no public way to find the UI Scaling, sigh). Can you write me from here and mention it's you, so I can send you an update? I will need confirmation from you that it works, since I'm not 100% sure the system I found to get the UI scaling is the same for Windows and OSX (because you have no UI Scaling option in the preferences).
Tested Daniele's patch, and everything looks good on the macOS side. Thanks!
Great ^_^ Will push it on the Asset Store on the next update :)
I'm using DOTween, on macOS, on a scaled monitor (at 2x scaling, aka retina). The path editor doesn't appear to respect my machine's scaled screen coordinates, so when adding waypoints, the waypoint's coordinates aren't set at the mouse cursor. They're instead divided by two. This effectively pins all coordinates to the top-left quadrant of the scene view, and is quite annoying to work with.
Attached GIF below to illustrate.
Versions are: DOTween v1.2.335 DOTweenPro v1.0.178