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
3
Question by JayOhhh · Mar 05, 2014 at 08:42 PM · iphoneresolutionscaleandriodaspect

Dynamically scale my scene/game objects for any mobile device.

Hello,

I am a fairly new Unity developer creating mobile games for Andriod and iPhone. Recently I published my first game on the Andorid store. I've received some excellent feedback from my peers and from external sources. One thing that I've noticed with developing for Andriod is that i'm having a few scaling issues. I'm currently beginning the first phase of design for a new game that I will be working on, and I want to start it right from the beginning.

1.What are the common best practices for creating your scenes and game objects to allow for a wide variety of resolutions/aspect ratios?

  • Would it be best to pragmatically scale and place your background images and objects on awake? What would be the performance impact of doing it this way?

  • I've currently placed code into my project to force it to a 16:9 aspect ratio which handles most devices. Is it best to just force it to scale to the largest aspect ratio out there and then place your game objects within the smallest aspect ratio, so it will work for all?

  • Is there a way to say anchor your objects to the view port? For example anchor your background so that it always scales within the view port. (My understanding is that the viewport changes depending on the devices aspect ratio).

  • Would it be best to create some sort of game manager script for example Scale Manager. You would place your background/game objects as per usual on the scene and then have the scale manager adjust their position/scale accordingly?

2.I'm having a few issues with text scaling on my GUI. I've kind of rigged it up so that in my scene view the gui text is HUGE. This apparently seems to work as it falls into place for most devices, but it doesn't always work and isn't foolproof. I am an indie developer so if possible i'd like to avoid paying for NGUI, are there any similar products for free on the asset store?

  • I've created multiple assets of my text with different font sizes. My GUIText objects on my screen all have their font sizes set to 0 as I was having scaling issues when working with the iPhone. Is this a common issue with GUIText? Is there a better way to manage using custom fonts for your GUI that I seem to not be understanding?

Any tips, resources or suggestions are greatly appreciated. I feel that setting this little bit up correctly before development will save me a lot of time and headaches in the future.

Thanks, Unity noob.

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 ANGRYSH4RK · May 23, 2014 at 05:00 PM 0
Share

having trouble finding much new information on the topic out there, would love to see some answers to his question.

1 Reply

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

Answer by SuperMasterBlasterLaser · May 23, 2014 at 06:00 PM

I think I have solution here My scenes got resolution 1280 x 800 for a good quiality. Then I just multiplicate camera to Matrix4x4. Works pretty fine to me and looks good on every device that I have tested.

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

23 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Dealing with GUI size on iPhone 1 Answer

How do I Scale a GUITexture or GUIText for different resolutions screen sizes on the iPhone? 1 Answer

Building iphone application, Design Resolution 1 Answer

newbe scaling maze sceen for different resolutions 0 Answers

apple rejected app due to iphone & iPad resolution mismatch 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