Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 julmot · Mar 09, 2015 at 12:01 PM · uiscreenpanelviewport

How to adjust the screen resolution?

Hi,

I need to develop a app with a panel. The difficult thing is, that if you open the panel on the left side the panel should not overlay the screen. Instead the viewport (screen resolution) should be reduced as much as the panel is wide.

I already builded a panel that will slide in but it will overlay the screen (viewport). How can I resize the complete screen (viewport) to subtract the panels width?

Comment
Add comment · Show 3
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 Owen-Reynolds · Mar 09, 2015 at 04:27 PM 0
Share

Can adjust the camera's Rect values, to make it take less of the screen, or slide over. Can play with it in Inspector to get a feel. Works the same way in code.

You asked about resolution. That kind of is. I think most people would say that limits the camera to only part of the screen.

avatar image julmot · Mar 12, 2015 at 08:39 AM 0
Share

Thank you for the hint. I see the values now in the Inspector. Unfortunately I have a problem with the sizes. The canvas is in pixels but the camera rect values need to be "0.X". What is up there?

avatar image Owen-Reynolds · Mar 12, 2015 at 05:56 PM 0
Share

That is correct -- sometimes you get sizes in pixels, other times in 0-1 percents. You do have to convert. The best way is to try to work out the math, then do a search. That way you'll understand what they're saying.

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

drag a UI panel keeping it with the screen bounds 2 Answers

How can I get a UI Panel's size in relation to the screen size? 1 Answer

UI elements following GameObjects (3d world) 1 Answer

How to Maintain Aspect Ratio Regardless of Screen Size 2 Answers

UI render doesn't sync with Camera movement 2 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