UPDATE:
It seems that from beta 13 the player supports retina if you set the Graphics API for Mac to “Metal (Experimental)” in Player Settings. Retina support is only available in fullscreen mode, though.
Original post:
Hello! It seems that the editor now supports retina resolution on mac, but the Mac Unity player does not? Am I missing something? Will retina support for the mac player be added in the final release of Unity 5.4? Cheers
I’d like to know this too. Although I’m a little confused with the differences at the moment - For me my UI is now showing very small in the Editor Game preview, but perfectly fine in the build. Is the fact that the UI (in game) being affected by the retina scaling a bug?
I’m currently making my asset xARM 5.4 ready and this causes some issues while changing the Game View resolution.
What’s the best way to detect if the Editor runs in retina mode?
I couldn’t find a flag yet.
I think this makes the Free Aspect mode useless on HD displays. The UI is just far too small. Macs (and Windows actually) usually scale up the UI in other apps so it’s x2 - giving you double the resolution but text etc appears to be the same size.
Setting Scale to x2 does not really work either, the game is cropped around all edges. I’ve also tried playing around with the Canvas Scaler component but it doesn’t seem to work correctly for me.
I’ve successfully implemented the UI scaling for any resolution by setting the pixel size to constant and changing the scale factor to whatever number would look good(+ take into account the user settings there)
You need to design all Your UI sprites around that - reference ppu and ppu in sprites and texture import settings need to be properly set.
Then it works very well.
sivael : your solution is working only for standard hidpi screens on Windows (and maybe Linux - not tested) but will not work on MacOS with Retina support.
I am doing that and it works perfectly on Windows with a hidpi screen but on MacOS, the game thinks the dpi is ~110 instead of ~220…
The render on retina is the good size but everything is pixelated… I would like to use the non retina resolution inside the app and then scale the UI manually but it seems to be impossible…
Am I missing something?
Should I tweak the info.plist file in the generated .app ? I will test that but not sure it will work…
What do you mean by “set to free”?
My game work very well on hidpi screens on Windows standalone by detecting dpi at runtime and then scale up UI but the standalone Mac only detects a 110dpi (instead of 220) and everything is already scaled up 2x in an horrible pixelated fashion… I would like to be able to use all available pixels and do the scale myself…
EDIT: Even in fullscreen, on a MacBookPro Retina 15", it detects a resolution of 2880x1800 but the detected DPI is still 110 (110.5 exactly) instead of 220. The result has expected proportions, the UI needs to be scale 2x to be at right size but the whole is pixelated as if the used resolution was 1440x900 scaled up in a nearest-neighbor (point) “filter”…
It seems that from b13 the player supports retina if you set the Graphics API for Mac to “Metal (Experimental)” in Player Settings. Retina support is only available in fullscreen mode, though.
OK tried it… The UI is working (but still not in retina) and the 3D is completely messed up with the void effect (repeating part of picture, flowing down, especially visible when resizing the window when in windowed mode)…
In fullscreen, the UI is wrongly stretched, 3D is void and the whole is not Retina… XD
Even in OpenGL2 (deprecated), the game does not work as expected with strange artifacts in 3D…
EDIT: tested on MacBook Pro Retina 15" in OSX El Capitan 10.11.5 / Unity Pro 5.4.0b18
oh…
I will test that to know if that will work in fullscreen at least as you say but my game must run in windowed mode by default
Thanks again for your help!
EDIT: Tested and no luck… The exact same problems are happening… And it seems the Game refuse to start in fullscreen by default even with the checkbox “Default is Fullscreen” checked. The box “Resizable window” is disabled and the collision detection of UI works in native resolution but the whole UI is weirdly stretched… and in non retina
Hmmm, not sure why would this happen, are you running OSX Elcapitan (Metal is only supported there)? if yes then maybe something went wrong with b18 or could be a project/graphics driver specific issue.
I don’t understand why anyone would want the player to use retina support. If you’re using the Unity GUI, it will scale everything for you. The last thing I want is for the OS to second guess my resolution settings and start resizing things for me, and giving me fake DPI settings, etc.
It scales it for you but you don’t actually get any increased resolution in the player atm (at least in windowed apps). It renders non retina resolutions atm, so if you’re a full screen window on a 15" retina mac you’re running at 1440x900, instead of 2880x1800, meaning you’re UI/graphics aren’t as nice and crisp as they could be (assuming you’re app/game can handle the extra resolution).