x


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.

more ▼

asked Dec 10 '10 at 04:49 PM

Facundo gravatar image

Facundo
276 8 10 17

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... Maybe someone else knows.

Dec 10 '10 at 05:03 PM Justin Warner

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.

Dec 10 '10 at 06:01 PM Facundo

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

Dec 08 '11 at 04:28 PM Cawas
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Dec 09 '11 at 01:10 AM

Justin Warner gravatar image

Justin Warner
6.3k 19 27 65

Now I'm only missing a way to identify the screen resolution has changed, because Screen.currentResolution is not working on windows 7.

Dec 09 '11 at 07:42 PM Cawas

No need to use currentResolution, just use Screen.width and Screen.height.

Dec 09 '11 at 08:12 PM Justin Warner

I sure tried both... With no success. :(

Dec 09 '11 at 08:13 PM Cawas

Try print(Screen.width); What's it say in the log?

Dec 09 '11 at 08:15 PM Justin Warner

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.

Dec 09 '11 at 08:17 PM Cawas
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x810
x338
x201
x171
x90

asked: Dec 10 '10 at 04:49 PM

Seen: 2573 times

Last Updated: Dec 09 '11 at 08:50 PM