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 nod786 · Jun 15, 2014 at 08:26 PM · screendisplayviewresolution settings

display issues

Hi guys, could someone kindly explain this to me and help me fix this issue.

My problem is unity is showing me a different view compared to when I put it on my phone and play my game, I want to be able to see what it will look like exactly in unity how it will be on my phone I have uploaded images to show you what the background n stuff look like viewing it in unity then in the game.

(sorry if this has been asked before I couldn't find a solution - plus new to unity) thanks guys

How it looks on unity -

http://i618.photobucket.com/albums/tt265/nod786/Mobile%20Uploads/received_m_mid_1402861733180_1d8c8ae4dd59faca87_0.jpeg

How it looks on the mobile -

http://i618.photobucket.com/albums/tt265/nod786/Mobile%20Uploads/received_m_mid_1402861783333_b5e101349f493f9103_0.jpeg

Comment
Add comment · Show 6
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 UnityDevelopper · Jun 15, 2014 at 10:36 PM 0
Share

Easy Way but only work for your type of phone go to the game view, click on the button that says free aspect, if you don't know your phones aspect ratio or resolution, research online then if you know it, find it in the given resolution and aspect ratio and if it isn't there click the + button,if it the resolution you know, enter the values otherwise click on the fixed resolution to change it to aspect ratio then enter the aspect ratio and that should make it fit the size of your phone but only youre type of phone.

avatar image nod786 · Jun 15, 2014 at 10:52 PM 0
Share

Hi thanks but is there a way to fix this problem so we can see what it will look like on any phone or device without having to change the resolution all the time just want it to display or show us what it will look like in any device because at the moment we have to kee guessing. Thanks

avatar image UnityDevelopper · Jun 15, 2014 at 10:59 PM 0
Share

Hard Way Works for all phones scaling using scripting, i believe like these this is c#

 private float scalex;
 private float scaley;
 
 void Start(){
 scalex= Screen.width/100;// Convert screen size in pixel unit
 scaley=Screen.height/100;
 Vector3 temp= transform.localScale;
 temp= new Vector3(temp.x*scalex,temp.y*scaley,temp.z);
 transform.localScale=temp;
 }

That the least i can do it a very complicated process but now using this you can scale object to the screen sizes(not position(that somewhat more complicated))

I try to get the rest asap if you can find it

avatar image UnityDevelopper · Jun 15, 2014 at 11:04 PM 0
Share

http://answers.unity3d.com/questions/30146/gui-texture-scale-and-position-according-to-the-ac.html

This article has many possible approach to this so i suggest this one than my one thought it a little bit complicated as i said before

avatar image nod786 · Jun 16, 2014 at 12:21 AM 0
Share

sorry guys for some reason pics didn't show so I've posted them again 1st pic is unity and how it looks on it

http://i618.photobucket.com/albums/tt265/nod786/$$anonymous$$obile%20Uploads/received_m_mid_1402861733180_1d8c8ae4dd59faca87_0.jpeg

2nd pic is exactly the same but how it looks on a mobile so is there anyway of setting up unity so it show exctly how it will look on the mobile, thanks guys

http://i618.photobucket.com/albums/tt265/nod786/$$anonymous$$obile%20Uploads/received_m_mid_1402861783333_b5e101349f493f9103_0.jpeg

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by StewVanB · Jun 15, 2014 at 11:16 PM

I believe that this link will help you.

http://answers.unity3d.com/questions/618058/mobile-device-screen-sizes.html

Comment
Add comment · Show 2 · 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 nod786 · Jun 17, 2014 at 01:45 PM 0
Share

Hi I tried this but this happens now lol.

alt text

avatar image StewVanB · Jun 21, 2014 at 12:29 PM 0
Share

Looks like what happened was the script is hard set for Landscape mode with this line:

 float targetaspect = 16.0f / 9.0f;

So if you change this to:

 float targetaspect = 9.0f / 16.0f;

It should get rid of the tallness.

I tried this out on my own mobile application and it only runs at the start. So build it out to some test devices and see if it is giving you the desired results.

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

Resolution in Android Games 1 Answer

Pick sensible resolution for FullScreen Mac App 2 Answers

Fixing screen resolution 1 Answer

Screen to view point? 2 Answers

What if the player sets resolution to higher than his monitor? 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