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 pokobros · Mar 10, 2014 at 10:06 PM · guiiospositioninggame editor

Planning GUI position for iOS

I am making a 2d game made with some GUI elements. I just built the project for the iPhone 5 and the positioning is off. How do I position the GUI with javascript or in the game editor? Also how does the game editor screen translate to the iOS device screens? This will help me figure out if I place a GUI button somewhere in the editor where it will appear on an iOS device's screen.

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 supernat · Mar 10, 2014 at 10:37 PM 0
Share

Can you post what you have now, and explain what part is off? As for testing in a similar environment for the iPhone, you can change your Game window aspect ratio to match that of an iOS. There's a small button in the upper left corner of the Game window to select aspect ratio. Note that if you use screen width/height values from code, they will still be relative to your computer monitor, not the iOS, and the only way I've found to fix that is to iteratively shrink the game window (undocked) until the width/height match your iPhone resolution. Then your pixel-based equations will work.

avatar image pokobros · Mar 10, 2014 at 10:59 PM 0
Share

I have the game editor in free aspect mode and with the GUI buttons I have buttons in a 5 X 5 grid at exactly the middle of the screen because I used it with Screen.width and Screen.height

1 Reply

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

Answer by fifthknotch · Mar 12, 2014 at 04:51 AM

Instead of using free aspect mode, create a custom aspect ratio 1136 x 640. That is the resolution of the iPhone 5 wide view. Then, position your GUI to look right in your editor. It will carry over to your iPhone correctly since the resolution is the same.

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

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

How do I make the size of GUI objects the same across all resolutions? 3 Answers

Assigning special Keyboard to GUI.TextField 0 Answers

Screenshot certain layers so it doesn't show GUI Button on the image?? 0 Answers

Store/Stack Items 0 Answers

Image becomes distorted when running on IOS 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