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 tobiasbu · Jun 19, 2015 at 06:32 PM · uibuttonui imagerecttransform

Displaced UI RectTransform collider in some resolutions issue.

Hello.

I'm creating custom UI buttons for my game using UI Images. I'm using C# scripts that provides IPointerHandler to detect when the mouse is over, clicking and exiting. When I builded the game, in some resolutions I have the following problem with the mouse on Rect Transform collision:

Normal Resolution (works perfect):

alt text

Another Resolutions. As you can see below the RectTransform is displaced to left.

alt text

Somehow in some resolutions the RectTransform collision is displaced. I don't know why. Why this happens? How I can solve this problem? I want that RectTransform colliders works perfect in all possible resolutions.

lowres.png (37.0 kB)
normalres.png (37.8 kB)
Comment
Add comment · Show 1
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 fjlafarga · Aug 19, 2015 at 12:00 PM 0
Share

Same problem but displaced up.

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Zoroastrian · Apr 28, 2017 at 05:52 AM

Maybe I'm too late, but I'll answer it just in case someone else comes to here in need of help:

Here you can read information about how the screens resolutions and the anchors of the UI works.

https://docs.unity3d.com/Manual/HOWTO-UIMultiResolution.html

As an important note, be aware that you probably want to set the anchor and NOT the Pivot. In my case I was making a mobile phone, and the layout joystic was moving strangely. I had to put the Anchor in one corner, and the pivot on the center of the screen, to make it pivot correctly, and not around a point in a corner.

I hope this helps someone ^^

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to Change Menu Button Rollover States with GameObjects 1 Answer

How do I scale the Xmax value of a RectTransform 3 Answers

Resizing UI Image but with minimum width 2 Answers

How to place a Button onto the right border? 0 Answers

How do you handle a scaledown animation on a UI button? 0 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