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
1
Question by jcastaldo13 · Mar 10, 2015 at 10:27 PM · androidbuildresolution

Resolution with GUI on Android

My game doesnt look the same on my android build as it does on the computer. There is a lot of extra space around the sides of my game on the android and the font is smaller. Not really sure why. In the editor everything is scaled perfectly and my gui objects are at the top of the screen. On the android they are smaller and down from the edge enough where its in the way. Has anyone come across this?

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

2 Replies

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

Answer by jcastaldo13 · Mar 11, 2015 at 12:32 AM

So I Fixed it. Im dumb. I forgot to set the anchors for the gui objects. Not sure why the text doesnt look right, thats still a mystery. So i doubled the text size on all my gui text and it looks much better.

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

Answer by TheFloatingSheep · Mar 10, 2015 at 10:41 PM

It's because of the pixel inset. LoL You will have to change the values for every GUI texture. But it doesn't work if you don't use a touch script, i know on android you can use OnMouseDown function too but without pixel inset you have no chance.

Set the Pixel Inset to: X:0 Y:0 W:0 H:0 The position: X:0.5 Y:0.5 Z:0 The Scale: X:1 Y:1 Z:1

For making a GUI Texture for a button and making it to stretch on any resolution: Just set every value from the Pixel Inset to 0

For making the same thing with a GUI Text: Disable the Pixel Correct CheckBox, that will make the text blurry, i know, but don't worry... It's blurry because the scale isn't normal. Just try to scale it until is isn't so blurry, and import another Font than the Default one, and clicking the imported font, and changing the resolution in the inspector to 500 and, after that you can adjust the size without blurring it whenever you want from the Font Size value ;D

And if you have problems with the 3D gameobjects, you will have to look in the unity documentation for Matrix Projection. Good Luck!

Comment
Add comment · Show 3 · 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 TheFloatingSheep · Mar 10, 2015 at 10:43 PM 0
Share

BTW, next time when you have a problem like this, search for another questions like your's because in the past 5 days i saw just this question. :| It's faster than waiting for an answer.

avatar image jcastaldo13 · Mar 10, 2015 at 10:59 PM 0
Share

I have no idea what you're talking about. Did I mention I am using the New Gui from the unity 4.6 update. I looked for the answers elsewhere but I also got answers like this. Very confused.

avatar image jtok4j · Apr 01, 2015 at 09:33 AM 0
Share

Greetings,

Is there any other way to do this, besides removing the "Pixel Inset" values? I have used the pixel inset values to correctly place child object's positions, relative to their parent object, so that the "whole set" of images for an area, is drawn in the same away, and doesn't get messed up with resolution changes.
Now, I do see a very strange/odd look in my GUI when playing the game. Things are not quite lined up and strangely stretched in areas.
If I simply use the xyz positions, the items can look fine at a low resolution (when lined up) but look all wonky and away from each other in higher resolutions... (So I resorted to pixel inset adjustment... and it looks fine in the editor... )

Any thoughts?

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

22 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

Related Questions

No cameras rendering in the game screen while build but after that, build succedded 0 Answers

Q about Building my game for so many devices 2 Answers

Android Build Problems? 0 Answers

Distribute terrain in zones 3 Answers

UI and resolution problems (fine in editor, problem in Android build) 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