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 Tommy_Caleca · Apr 07, 2015 at 01:02 AM · guibutton

Interactable buttons are disabled?

Buttons in my HudCanvas are disabled despite them being intractable. I literally cannot find a single question about this, so I'm not sure if it's been asked before. I'm fairly new to Unity(just started in the last couple of months) so I'm not sure what to do here, help?

Comment
Add comment · Show 3
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 DoTA_KAMIKADzE · Apr 08, 2015 at 01:15 AM 0
Share

Can you elaborate? Something like showing us your Button settings, and also how exactly it is disabled? you have a click event and it doesn't execute or...?

avatar image irilox · Apr 29, 2015 at 12:27 PM 0
Share

I have the same problem with Unity 5.

I created a basic button:

alt text

And on "play" the button is immediately disabled:

alt text

EDIT: problem solved, see my other answer

button2.png (3.5 kB)
button1.png (17.4 kB)
avatar image EvilSushi · Nov 11, 2015 at 07:45 PM 1
Share

I have the same problem:/ EventSystem is there, enabled and intractable set, but on start up its disabled...and no code is able to re enable it

3 Replies

· Add your reply
  • Sort: 
avatar image
19

Answer by Ensutee · Nov 24, 2015 at 10:01 AM

I just had a similar issue and spent an annoying amount of time trying to solve it.

The cause of my case was simply that a parent object had a CanvasGroup component which had "Interactable" disabled. This then rolled out into all of its children resulting in a similar case to what you were experiencing. Enabling "Interactable" solved the issue for me.

Comment
Add comment · Show 2 · 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 Ensutee · Dec 06, 2015 at 02:42 PM 0
Share

That would be: Enabling "Interactable" on the parent CanvasGroup. Alternatively you can add a new canvas group on the button object, set that to interactable and tell it to overwrite it's parent.

avatar image Lucem-Ferre · Sep 11, 2018 at 06:22 AM 1
Share

O$$anonymous$$G, you saved my *ss so hard, i must login to like this!!!

avatar image
2

Answer by irilox · Apr 29, 2015 at 12:20 PM

I had the same problem and explained my problem in this thread (still needs to be approved at this point).

And a few minutes later I suddenly found the problem (and the solution):

When you create a new Canvas, it creates automatically a gameobject "EventSystem" next to it. I had deleted that one (probably by accident) and didn't remembered is was even created.

Adding a EventSystem didn't solve the problem.

To solve the problem I needed to create a new Canvas (so that is creates the EventSystem), copy the content of my old canvas to the new one and delete the old one

I hope this solves your problem

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 FurretTurret · Dec 02, 2015 at 09:02 PM 0
Share

This shouldn't be the case. I just tested briefly with creating and deleting EventSystems during execution with just a Button in a Canvas, and the Button behavior worked as expected when EventSystems were added, without having to recreate the entire Canvas.

avatar image
0

Answer by zviaz · Apr 08, 2015 at 09:19 AM

Not sure if this helps (might be your button script) but this is the StartButton.cs script I use for a "Start Game" button on the title/start screen. (I'm using Unity 5) Simply create an empty Game Object in the Canvas and attach the script.

 using UnityEngine;
  
 public class StartButton : MonoBehaviour
 {
     void OnGUI()
     {
         const int buttonWidth = 84;
         const int buttonHeight = 60;        
         Rect buttonRect = new Rect(
             Screen.width / 2 - (buttonWidth / 2),
             (1 * Screen.height / 4) - (buttonHeight / 2),
             buttonWidth,
             buttonHeight
             );
         
         if(GUI.Button(buttonRect," PLAY "))
         {
             Application.LoadLevel(1);
         }
     }
 }
 



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

9 People are following this question.

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

Related Questions

The Button in the middle activates if i press two side of the button. 0 Answers

Infinite GUI Button positions. 3 Answers

Making a Hover function for a button or toolbar from code. 2 Answers

Camera being disabled by any GUI button 2 Answers

Controlling GUI with Xbox 360 Controller 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