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
4
Question by bhavinpanara22 · Dec 20, 2014 at 07:00 PM · panelunity4.6new ui

Weird Unity buttons.Sometime works, sometime doesn't work.

Hello everyone,

I am facing the weirdest thing of Unity. In Unity 4.6.1, i have implemented a canvas. In canvas there is one panel, and that one panel have 9 children panels. Each panel of these 9 panels, contains one button. I have applied functions on all of those buttons.Function script is applied on parent game object of these 9 panels. So, script is applied on a panel. When i play the game, button works sometime & sometime it doesn't work.

I have just put Debug statement on all buttons. Please help me & let me know, if any one facing the same problem.

I was facing same problem in Unity 4.6.0 also. Thanks.

Comment
Add comment · Show 10
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 jakovd · Dec 20, 2014 at 07:08 PM 0
Share

button works sometime & sometime it doesn't work

Button or buttons? Do some work and some don't? Or sometimes all buttons either work or don't?

avatar image bhavinpanara22 · Dec 20, 2014 at 07:10 PM 0
Share

they don't listen to my code. they will give output sometime & sometime will not give output. All of the BUTTONS behaves like this.

avatar image Mmmpies · Dec 20, 2014 at 07:16 PM 0
Share

What do the buttons do? And what are the outputs from your debug log?

Do the buttons respond to a mouse click. I had something not totally different when I first started the new 4.6 UI. What I'd done is enabled a panel over the top of some buttons. Hadn't noticed I'd bumped the transform so it was now over the button.

Anyway give us some more details or even screen shots.

avatar image jakovd · Dec 20, 2014 at 07:17 PM 1
Share

Check if your buttons are covered by some other Collider. $$anonymous$$ight be that there is another object with collider on the same Z-axis value that gets in front of your buttons. Really, I have not enough information to help you with this.

avatar image RedHedZed · Dec 20, 2014 at 07:25 PM 1
Share

I experienced a similar issue once. I had a panel partially covering a button, so it wouldn't work when I clicked on it. The reason it took so long for me to figure out was because the part of the panel that was covering my button was invisible. Being invisible doesn't mean it's not there though. I couldn't click through it so it was like I wasn't clicking on the button at all.

Show more comments

11 Replies

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

Answer by Mmmpies · Dec 20, 2014 at 07:50 PM

OK the answer looks like a panel was over some of the buttons as I posted that first I'm putting this in as the answer.

Good idea to make buttons really obvious when being clicked during debugging issues then you can what is reacting to a click.

The panels are transparent as @RedHedZed points out so difficult to spot another debug idea is to look in the scene view whilst the game is running to see what panel is where.

It helps others if the answer is ticked correct, because who checks unanswered questions for a fix for their similar problem, so feel free to approve the answer or any of the comments.

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
7

Answer by Egil-Sandfeld · Feb 02, 2016 at 05:31 PM

My issue was solved because I had two Canvas displaying at the same time. I fixed my issue by assigning "Order in Layer" in one of the canvas' to 1. They were both 0 previously, which probably caused some issues ;)

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 dreg_master · May 25, 2018 at 02:44 PM 0
Share

Thanks so much! I have another canvas for game pause/timeline buttons that needed to be independent of other UI objects

alt text

screenshot-2018-05-26-004534.png (44.4 kB)
avatar image
2

Answer by rsodre · Feb 26, 2016 at 08:19 PM

Is it inside a ScrollRect hierarchy? Try adding an empty EventTrigger to the button.

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
1

Answer by EdwinFoe · May 26, 2016 at 09:44 PM

I had the same problem. In my case, the reason was that I had both: TouchInputModule and StandaloneInputModule on the same gameObject. Just removing one of inputs solves my problem.

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 moment_um · Jan 04, 2016 at 02:43 PM

i'm having the same issue. it cant be layers or anything, BC 1.) I can press play, do nothing but press the button and it works, and then stop and play again, press the button and it doesn't work. I think it as something to do with that stupid frustum out of view bug. 2.) I have attempted putting everything on different layers, zed's and sorting layers... still doesn't work. I don't understand how something can work sometimes and not others.

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 JPBA1984 · May 08, 2017 at 05:37 PM 0
Share

This looks more like a comment or another question.

  • 1
  • 2
  • 3
  • ›

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

42 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 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

[C#] How to code within the Unity 4.6 new UI Panels? 0 Answers

unity 4.6 ui canvas panel solid color 1 Answer

Splitting the game view - part camera, part opaque navigational panel at runtime 1 Answer

Buttons around game object. UGUI 4.6 0 Answers

Animate a panel to be outside canvas no matter size? 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