Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by nelsonIST · May 27, 2016 at 01:17 AM · editor-scriptingcustom-inspectorgameviewresolutions

Change gameview ratio / resolution using a custom inspector?

Hi, I'm trying to switch the gameview resolution (ratio) through a custom instpector, but I'm not having much luck. I can't seem to wrap my head around how to access the list of gameview resolutions. Is there a simple way to get this list?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Muhammad Salman · May 27, 2016 at 07:18 AM

alt text

Try this one and you can add any resolution you want but click on the (+) button on the button left corner of the pop up.


screen-shot-2016-05-27-at-120724-am.png (106.6 kB)
Comment
Add comment · Show 1 · 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 nelsonIST · May 27, 2016 at 02:38 PM 0
Share

That's what I am trying to avoid doing, so that I can speed up the work flow.

$$anonymous$$y project will be used on computers with 2 displays with different resolutions, and there will be 6 configurations in all. Due to the dual monitor functionality being broken in unity (especially in linux, which is my target platform), I have to run the game in a wide window that will cover both displays.

One display will be for the game, and the other for the UI on a touch screen.

Since there are 6 configurations in all ( a mix of 16:10 and 4:3), I have to adjust the width, height, and positioning of both cameras (camera viewport rect) in the scene, as well as switch the gameview to match the proper ratio of those views. IE: 1024x768 + 1920x1200 will need a window size of 2944x1200 where 1366x768 + 1600x1200 will need a window of 2996x1200

I have created a custom inspector to change the camera viewports depending on the configuration, but I couldn't figure out how to switch the Gameview mode in the editor. (I want to have it all in 1 button to speed up work flow)

I found this thread: http://answers.unity3d.com/questions/956123/add-and-select-game-view-resolution.html Which does what I want, but I couldn't get this code working in my custom inspector.

$$anonymous$$y solution, is to use that script (with some modifications ) and call the function that adjusts the Editor Gameview from my custom inspector.

Thanks anyway!

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Custom editor, serialize and prefab issue 0 Answers

Persistently changing variables from custom editor 2 Answers

A smarter Way to get the Type of SerializedProperty 6 Answers

Deep Copy of ScriptableObject 1 Answer

How can I recreate the Array Inspector element for a custom Inspector GUI? 7 Answers


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