- Home /
How to make standalone player resizable?
I'd like the user to be able to resize the game window when playing on a Mac in windowed mode, by dragging the lower right corner of the window.
So far the applications I build are insensitive to such a gesture. Is there any piece of code that would take care of that?
Help will be much appreciated.
I'm pretty sure that they can choose it at the beginning of the game... So they can choose then, if you want it to do that during game play, I dont think you'll be able to unless you get the source code... $$anonymous$$aybe someone else knows.
Yes, at the beginning you can choose from a list of predefined dimensions. But that's not quite the behavior a user would expect of a native window, hence my interest in the resizing using the mouse.
And now with windows 7 and 8 running on tablets, something in this sense becomes essential! Did you happen to find any solution? - related: http://answers.unity3d.com/questions/148593/create-maximize-window-button.html
Answer by will_c · Apr 08, 2014 at 10:15 PM
Based on the comments, I'm not sure if the problem is related to retrieving the resolution that it's been changed to or physically enabling the ability to resize the application window. If it's the latter, there is an option in Edit -> Project Settings -> Player under Standalone Player for "Resizable Window" that can be checked to allow this behaviour.
Answer by Justin Warner · Dec 09, 2011 at 01:10 AM
http://answers.unity3d.com/questions/37266/how-i-can-change-the-screen-resolution-in-real-tim.html
Googled: https://www.google.com/search?rlz=1C1GGGE_enUS456US456&gcx=c&sourceid=chrome&ie=UTF-8&q=change+resolution+unity3d#pq=change+resolution+unity3d&hl=en&sugexp=pfwe&cp=18&gs_id=4&xhr=t&q=change+resolution+unity3d&tok=Q3nzD99pqLMTOrC7Ly1vsw&pf=p&sclient=psy-ab&rlz=1C1GGGE_enUS456US456&source=hp&pbx=1&oq=change+resolution++unity3d&aq=0j&aqi=g-j1&aql=f&gs_sm=&gs_upl=&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=c68993b7b411a584&biw=1777&bih=976
Enjoy.
Now I'm only missing a way to identify the screen resolution has changed, because Screen.currentResolution
is not working on windows 7.
No need to use currentResolution, just use Screen.width and Screen.height.
Screen.width
brings the window area size (not actual window size) while currentResolution
is the actual screen size. You can actually see the error if you try on your windows, in case you're using one. Just try changing the window orientation while running an EXE compiled and you'll see none identify the resolution change.