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 El-Deiablo · Oct 05, 2016 at 03:00 AM · collidersspritesscaling

Scaling On Different Devices Issue

I recently finished my game and am running tests on different devices preparing for release on the app store. The game is set in landscape mode and cannot be played in portrait mode. The game runs perfectly on my iPhone 6. I tried the iPad Pro (biggest screen possible) and it looked horrifying. Sprites, buttons, and images were not the right size or in the right places. Also one of my scenes has 4 box colliders - one right, left, top, and bottom to allow a ball to bounce within the screen - the left and right colliders were further left and right compared to the screen (so the ball would go off screen before making contact with the collider. Some sprites were really big and others smallI did a bunch of research and have tried many things, but am still struggling. Here's what I tried:

1) Made sure I set the canvas in every scene to scale with screen size (height and width = 0.5). 2) Tried changing the scale with screen size dimensions (currently at 800 X 600). 3) Made a new project and imported all assets and rearranged what was off - this worked great on iPad (I use a 4:3 compared to free aspect in my other project), but when running on iPhone some of the buttons don't scale right and my sprites and animations (like title text dropping down when scene switches) are off. 4) I also tried utilizing this code, but had no luck after attaching scripts to main camera - http://gamedev.stackexchange.com/questions/79546/how-do-you-handle-aspect-ratio-differences-with-unity-2d 5) Also used anchors on all UI elements and for the most part buttons are scaling alright, but everything else goes haywire.

This is so frustrating! Is there a way to have all your assets, sprites, images, and buttons stay in the same position regardless of the device it's run on? Like just take the iPhone 6 version and write some code to stretch all scenes to match iPad dimensions. If there is anything that is unclear in my question or if you need screenshots I will update my post asap. I would appreciate any help.

Comment
Add comment · Show 2
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 JennyHide · Oct 05, 2016 at 05:01 PM 0
Share

Have you read this? https://docs.unity3d.com/$$anonymous$$anual/HOWTO-UI$$anonymous$$ultiResolution.html It sounds like your anchors aren't all set correctly, and you might need to add the Canvas Scaler component.

Your question isn't very clear - what does "everything else goes haywire" mean? Is it non-UI objects that you're having trouble with now?

avatar image El-Deiablo JennyHide · Oct 05, 2016 at 06:16 PM 0
Share

Thanks for the reply. I have gone through that tutorial and that covers UI. The UI is not much of problem, but I do have some sprites in my scenes. I am going to try and change as many of my sprites into images as possible. The biggest concern I have though is about the box colliders I have set up on the edges of the screen. I created a new version of my game to fit a 4:3 ratio and it runs great on iPad Pro, but when I run it on my iPhone 6 the box colliders move in and it looks like the ball is bouncing off of invisible walls. What could I do about that? Also I have some animated sprites that I'm not entirely sure I can convert to images (I will do more research on this now). If I can't convert the animations to ui image, how can I anchor the animations position to, for example, the bottom left corner?

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

59 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 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 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

Sprites automatically become smaller 0 Answers

How can I dynamically change colliders when animating a 2d sprite? 0 Answers

physics.OverlapSphere colliders 1 Answer

How to tile sprite in 2D game when scaling instead of stretching 2 Answers

Colliders scale on parenting and rotation 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