Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Thingummywut · Jun 28, 2013 at 02:29 PM · resolutionstatsgame window

Programmatically change the Game Window resolution

Hello!

I've been looking for a way to either programmatically change the resolution of the game window or add/change the predefined resolutions. So the resolution I want to be able to set, instead of having to manually resize with "Free Aspect", are the ones shown as eg. "Screen: 1136*640" when showing "Stats".

Any clues on how to accomplish this? Is it even possible? Cheers!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by PAEvenson · Jun 28, 2013 at 02:51 PM

Perhaps this is what youre looking for?

http://docs.unity3d.com/Documentation/ScriptReference/Screen.SetResolution.html

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Thingummywut · Jun 28, 2013 at 03:00 PM 0
Share

Thanks for the reply!

What I'm trying to do is an editor tool where I can specify a resolution, for example 1136 * 640, press apply, and the game window resolution would be set. I did try that using Screen.SetResoulution( x, y, false ) but it had no effect.

*edit. Or, as I mentioned, be able to add custom resolutions to the predefined resolutions.

avatar image PAEvenson · Jun 28, 2013 at 03:28 PM 1
Share

The SetResolution will work, but only in the actual build. To set your editor window resolution you need to go to Edit->Project Settings->Player and go to the resolution tab. You can specify the default resolution, which will be the Standalone option in your game window.

If you are trying to make a unity editor to quickly test custom resolutions you can access the player settings here: http://docs.unity3d.com/Documentation/ScriptReference/PlayerSettings.html

If you are trying to add custom resolutions to the Resolution dialog, I found my best solution was to create my own custom resolution dialog GUI that gets shown on startup.

Hope this helps...

avatar image Thingummywut · Jul 01, 2013 at 08:07 AM 1
Share

Thanks again PAEvenson!

Would upvote if I had karma enough :)

avatar image
0

Answer by Wanzyee · Jul 23, 2016 at 09:00 PM

Hi @Thingummywut, If you're still looking for it, you may take a look at my doc. And the script below~~ feel free to try it. link text


gameviewresizer.zip (2.3 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Set Main Camera to a Default Resolution? 3 Answers

How to copy custom resolutions between projects? 0 Answers

Resolution trouble with Kongregate 0 Answers

instantiate object at the edge of screen 1 Answer

Why does the resolution of my terrain seem so low? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges