Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
11 Jun 22 - 14 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 Nyozz · Aug 14, 2015 at 07:11 AM · user interface

UI Button click Position different to actual position

Hey,

I'm using unity 5.1. I have a problem with the Button click position.

If I run the project on my native resolution which is 1920x1200 everything is fine but as soon as I choose a different resolution, the actual click on a Button is completely wrong. It is like the Button is drawn at x=10 y=10, but the click is not the same position as the button. so to click the button I have to click in empty space. What can that be? Seems like a mouse transformation bug, and I do not use own code. I use the onclick handler of the UI Button element.

Can someone help me?

Comment
Add comment · Show 7
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 itsharshdeep · Aug 14, 2015 at 08:51 AM 1
Share

Hi

What I got from you question is Button is remaining at the same position as it was... If this is the problem then pls set the anchor points at proper position sot that they components retain their position.

Second If there is any other problem then please post the screenshots both correct one with 1920x1200 resolution & second screenshot with incorrect button

avatar image CoDeXiTo · Aug 14, 2015 at 04:05 PM 0
Share

When i have normal monitor resolution 1600 x 900 alt text

when i have 800x600 and first put window mode true and later false and return i see this

alt text

the all buttons not work

i use this code

first start on full screen 1600x900

later use this

Screen.SetResolution(800,600,false);

and later use this

Screen.SetResolution(800,600,true);

and the buttons not work

juego-2015-08-14-17-43-59-76.jpg (124.5 kB)
juego-2015-08-14-17-44-19-28.jpg (86.5 kB)
avatar image itsharshdeep · Aug 17, 2015 at 09:47 AM 0
Share

Hi

Thanks for the screenshot now what I am getting from the screenshot is they are scaled down when you change the resolution of the monitor.

can you please confirm this.

you have to set the properties of the canvas like this alt text

Please message if this work or not ..

screen-shot-2015-08-17-at-31632-pm.png (15.7 kB)
avatar image CoDeXiTo · Aug 17, 2015 at 02:49 PM 0
Share

i try this solution and have same problem :(

avatar image itsharshdeep · Aug 18, 2015 at 04:11 AM 0
Share

Try to update the Unity ... Because I'm also using the Unity 5.1.1f1 & 5.1.1p1 .. my mates are start using unity version 5.1.2 .. but I think we are not getting the such type of bug as you are saying .. So try this last solution, may be it works.

Issues we are facing are like mask is not working in mobile, buttons & 3D models are leaving their frames behind if we are changing the color of the Camera. But we have alternates for that so we are happy. But unity 4.6.x (above 4.6.2) are great versions if you have your projects on that version so go for that one.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Nyozz · Aug 17, 2015 at 09:45 PM

I tested everything and it is definitely a bug. I created a new scene, added a UI button and a click handler and problem still exists. So its no third party sourcecode its unity. Buttons appears on the right position. But the actual click is on different position. I used no source.

So i'm guessing its a bug. It doesnt appear if I choose the exact same resolution I developed the game with in playmode.

Comment
Add comment · Show 1 · 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 itsharshdeep · Aug 19, 2015 at 05:08 AM 1
Share

Check the following link, I think some other peoples are also facing the same problem

answers.unity3d.com/questions/1028964/unity-5-new-ui-button-colliders-moved-to-the-left.html

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Question on Saving "Hierarchy state" 2 Answers

Whats the most efficient method for placing UI elements at world positions? (Above units etc.) 2 Answers

UI Text 2 Color Horizontal Fill With Sliding Dividing Line 0 Answers

How to draw a 2D graph 1 Answer

World UI elements not render correctly on multiple 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