Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Qedized · Sep 30, 2017 at 02:42 AM · c#uibuttonsceneunity5

I can't click to an UI button.

Hi.

I created an UI button. It's a children of a canvas. It has an animation to make it intractable when the player dies and shows it. I have my EventSystem. By the way, the button is as I said after the enemy dies to go to the main menu, which is basically changing the scenes.

I tried to find a solution for this for like 3 days, but couldn't find anything. I have other buttons in my main menu, which work just fine. I'm stuck...

Thanks for the help.

(You can ask questions about my problem)

Edit: Screenshots: alt text alt text

Edit 2: Still not solved. Tried a lot of things.

Last edit: SOLVED! The problem was that my canvas had a canvas group and it was not intractable. I added a Canvas Group component and checked intractable on the ignore parent group on. So it was just that... Thank you all for trying to help me. Much appreciated.

unitybuttonerror1.png (437.4 kB)
unitybuttonerror2.png (185.2 kB)
Comment
Add comment · Show 11
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 MaxGuernseyIII · Sep 30, 2017 at 03:37 AM 0
Share

A lot more information will be required. How do you know that the button is not being clicked, as opposed to the event bindings for the button being broken or the code in an event binding simply not working as expected?

avatar image Qedized MaxGuernseyIII · Sep 30, 2017 at 03:41 AM 0
Share

Hi, thanks. I know that because I use the exact same code for other buttons too and they work just fine. I'm a beginner, so my button and canvas system is really not complicated, so I do not think there will be errors. By the way, its color doesn't also change when I hover my mouse on them.

avatar image Qedized MaxGuernseyIII · Sep 30, 2017 at 03:42 AM 0
Share

So there is probably something wrong with the button (script) component. Or there is something blocking it. I really have no idea.

avatar image MaxGuernseyIII Qedized · Sep 30, 2017 at 06:51 AM 0
Share

@bolkay nailed it. Post pictures of your scene hierarchy and the components of your button and people might be able to help you.

Show more comments
avatar image bolkay · Sep 30, 2017 at 05:42 AM 0
Share

Try to post a picture of the scene. @redfirearne.

avatar image Qedized bolkay · Sep 30, 2017 at 04:27 PM 0
Share

Hi, just added them. Thanks.

avatar image bolkay Qedized · Sep 30, 2017 at 06:14 PM 0
Share

Ok, i've seen it and appears to be well. @redfirearne. What to do? TRY to drag the button up in the hierarchy to be just under HealthUI object. Try it quickly.

Show more comments
avatar image Hellium · Sep 30, 2017 at 04:30 PM 0
Share

Check the answer here :

http://answers.unity3d.com/questions/1402544/so-my-buttons-stop-working.html

avatar image Qedized Hellium · Sep 30, 2017 at 05:34 PM 0
Share

tried it. it doesnt show, but everything you said, are in my scene.

3 Replies

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

Answer by Positive7 · Sep 30, 2017 at 10:47 PM

In Canvas you have a Canvas Group and interactable is turned off. On Game Over turn it on and everything should work fine or add a Canvas Group to the button gameObject and enable "Ignore Parent Groups"

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 Qedized · Sep 30, 2017 at 11:34 PM 0
Share

O$$anonymous$$G! That's it! You found it. Thank you very much!... :)

avatar image
0

Answer by FernandoGBR · Sep 30, 2017 at 05:27 PM

If I am not wrong, and you are doing what you say, there is nothing preventing the method to execute.

Have you tested with a Debug.Log() if the flow reachs the method that you are calling?

Is the main scene added to the build scenes in the build settings?

I hope my little knowledge can help you.

Comment
Add comment · Show 4 · 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 Qedized · Sep 30, 2017 at 06:05 PM 0
Share

Yes, it is added to the build scenes. But, I don't know how to test it with a Debug.Log(). But as I saw, in the EventSystem, it doesn't say that I'm on the button.

avatar image FernandoGBR Qedized · Sep 30, 2017 at 06:16 PM 0
Share

You are supposed to be calling a public funcion inside a monobehaviour script attached to that button$$anonymous$$anager. That function is supposed to be called openAnother... . Try to place Debug.Log("I am inside the function"); in the first line of the function and the unity console must tell you that string.

avatar image Qedized FernandoGBR · Sep 30, 2017 at 07:52 PM 0
Share

Nope, it doesn't work. As I expected. Because I said nothing in the button works. Normal color, highlighted color, nothing.

Show more comments
avatar image
0

Answer by ronzkie88 · Jan 20, 2018 at 11:44 AM

Hey Guys I had the Same issue I resolved the issue by turning on intractable like @Positive7 said but also turn on Blocks RayCasts this is what solved this issue for me. @redfirearne :) Hope it helps.,Hi Guys I had the Same Issue and after animation Turn on Intractable on as well a turning on Blocks RayCasts this worked for me as After my game over canvas animation my button was not clickable.

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 Qedized · Jan 20, 2018 at 02:39 PM 0
Share

Hi, I've already resolved the issue by turning intractable on :)

But thanks, others might find this helpful.

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

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

Related Questions

Unity 5: UI button OnPointerDown not function as expected 1 Answer

Change scene and play it by clicking UI Button? Scene does just load but not start playmode? 1 Answer

How To Put 2 Panel in 1 scene? 2 Answers

Get UI Button dimensions in game via script C# 1 Answer

How Do I Change UI Text With A Button Click? 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