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
0
Question by GetColor · Sep 14, 2012 at 12:09 AM · scaling

Can I just scale my game for any resolution?

So, I'm having issues with resolution in my game. My game is a 2d game where the players need to see the entire scene at all times. If I change resolution, and please correct me if I am wrong, but it just changes the size of the main camera, meaning now the players see more than what I want them to see.

Is there a way where I can just scale everything that I want the players to see when they change resolutions instead of changing the size of the thing viewing it? I know that unity will basically do this if you try to set a resolution that is too high for someones monitor, it will scale everything down. So can I somehow make it so it will scale like this on my terms?

Thanks!

edit I don't have time today to code, but this is what I am going to try and let me know if there is anything wrong with this: Calling findobjectoftype at the start of my game with the type of gameobject. Throwing all of those into an array, and using For Each and multiplying their scale by the screen resolution ratio. Then any new objects coming into the scene after load, having them instantiate at that same ratio. Good plan? Bad plan? I'll give it a shot tomorrow.

Comment
Add comment · Show 1
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 GetColor · Sep 15, 2012 at 09:45 PM 0
Share

Hey guys! I was being dumb! So... apparently it does scale everything by resolution and not just changing the camera size >.< I now understand the confusion haha! I'm going to go hide in a corner now.

1 Reply

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

Answer by Kirbyrawr · Sep 14, 2012 at 02:26 PM

If you want scale GUI , you need to do script like this:

 if (Screen.width +1366 && Screen.height +768){ 
  //do it
 }

Hope it helps , in the script you can change these numbers to custom numbers for your screen or other biggers :3

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 GetColor · Sep 14, 2012 at 08:20 PM 1
Share

I'm looking to scale everything the game renders. So not just the GUI, but all of the game objects and what not. I come from XNA and it basically does this for whatever device you put your game on by default, so I didn't even think about it until my game was essentially finished! eeek!

Thanks for the reply though.

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

10 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

Related Questions

Scaling water flow parts 2 Answers

Scaled object immune to clicking 0 Answers

Problem with rendering after using localScale 0 Answers

can i find Joystick Position based on screen size? 0 Answers

Fixed Tiled Vertex Accuracy problem... which has caused a lighting effect problem 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