• 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 Bachey · Aug 16, 2016 at 05:07 AM · androiduispriteresolutionaspect-ratio

Inconsistent Sprite location on screen

Hi!

I want to put 2 sprites to the bottom left of the screen.

     xpos = ypos = 200;
     cam = GameObject.Find("Main Camera").GetComponent<Camera>();
     gameObject.transform.parent.position = 
     cam.ScreenToWorldPoint(new Vector3(xpos, ypos, 0.33f));
     gameObject.transform.position = cam.ScreenToWorldPoint(new Vector3(xpos, ypos, 0.35f));

It works perfectly on my pc and my Mediapad 7 tablet and PC, however on my galaxy S7 it appears very close to the corner, instead of the coordinates 200, 200. Something is inconsistent. I also noticed that 3D texts appear slightly larger on my galaxy s7. It acts like if the screen is cropped or something similar. The aspect ratio is the same as on my PC. Any ideas why it appears differently on my phone than on my tablet & pc?

Thank you for taking your time for my problem!

Comment
Add comment
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

1 Reply

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

Answer by Bachey · Aug 17, 2016 at 04:39 PM

I solved this matter for myself, I had to scale the sprite with respect to the screen resolution, if someone encounters a similar problem in the future. :)

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Use different sprites in new Unity UI for SD vs HD 2 Answers

How can I support FHD+ Resolution in Android game? 0 Answers

Android Resolution Solution ? 1 Answer

UI resolution issues - Build EXE 5 Answers

How to build android game with 18.5:9 ratio? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges