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
1
Question by MonkeyZero · Feb 24, 2015 at 01:17 PM · uierrorcanvasbuttons4.6

HELP! Buttons stop working when made a child of a "Canvas Group" empty in 4.6.3f1?

Okay so now I have noticed a big problem for me.

While creating a rather complicated MainMenu with a few pages and my SceneHUD canvas, I have been using the Rect Transform version Empty GameObject to organize these into containers and/or pages so that I can keep track of all of the little details, but more over, also to control visibility of my widgets that are not always needed. Just to keep the players view from getting too cluttered when certain this are not needed to be Tracked. things like health Bars when the player is not in a combat state or area.

Normally this works out great for me from an organization standpoint. However, my goal is that not everything should be visible at once, and I want a smooth Fade-in and Fade-out transition effect of entire button/widget groups. And not just the buttons background, but the child objects inside them as well.

The Canvas Group script or plug-in, I know allows for entire groups of items to have their Alpha set 0-1, Toggle Intractable of all the children, Block Raycasts, and finally Ignore Parent Groups.

The moment I put a canvas group on the parent empty, all of the child button objects inside 100% breakdown. I have tried toggling the intractable, block raycasts and ignore parent groups in various combinations I even tried turning on and off the whole "Canvas Group" script it self to no avail. even when off but present on the parent empty, Buttons just do not work at all for me.

It took me an hour of troubleshooting to figure out it was the Canvas Group causing this. whats worse it happens even when the button group object is a child of another empty with canvas group attached.

The only way to fix this issue, it to work my way up the container family tree of the canvas and remove every single canvas group from the inspector. Not just turn them off or fiddle with the toggles, but remove it entirely.

I need the overall control of the group's alpha value for my desired fading effect, and I am not aware of any other way to control this with out having to dive over my head in code. I lucky I can code a main menu control script that is usable with the event system with Application.LoadLevel(string veritable) and .Quit() abilities.

Comment
Add comment · Show 2
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 MonkeyZero · Feb 24, 2015 at 02:44 PM 0
Share

The question is not how to organize my pages, as that is covered already, as I have said before.

If you want a figure of how I have it organized right now, I have like 5 Pages for the HUD (Health, $$anonymous$$agic, Sta$$anonymous$$a, Active Weapon, Active Power, pause menu, targeting reticle) alone and like 10-ish for $$anonymous$$ain $$anonymous$$enu (Settings, Game $$anonymous$$anual taking a good chuck of pages, Credits, the splash screen, etc). How to control Alpha visibility and Intractable Toggles while not breaking the buttons inside the Empty or in your case the Panel.

That is the actual question. As far as I can tell the only way to control alpha of the parent and child object at once, and that come stock in unity, is the Canvas Group.

A UI Panel is no different then a UI Image, it just starts with a low alpha and a sprite already setup. The empty object serves as a container stripped of all the junk. Placing a Canvas Group on the panel object still breaks down the buttons inside the panel, and lastly the UI Panel only controls alpha for it's own UI Image, not the alpha's of the children as well.

I can activate and deactivate the Empty Objects for the instant pop on and off effect all day long. What I want is a 2-3 second smooth fade in and out effect and still keep the buttons working for when the buttons are visible again.

For now, the popping change over is how I am forced to have it. I can do the fading in/out effect with script controlled items that the player does not have to interact with via direct manipulation with a mouse cursor and raycasts.

Grrr... Okay well answer that was a bust. hopefully a better, more on topic, answer will show up soon. Until then, I am still working on it.

Thank you anyways for the attempt at an answer GJF, I wish it had actually helped.

avatar image Nimred · May 27, 2015 at 01:47 PM 0
Share

I just encountered the same issue in unity 5, would be nice to know what's going on...

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Nimred · May 27, 2015 at 01:52 PM

I had the same problem, but in my case using "Blocks raycasts" (and "Interactable" of course) fixed it. (Unity 5.0.1f1)

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 Hanh · May 03, 2018 at 10:58 AM

Adding GraphicRaycaster will help

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 MonkeyZero · Mar 05, 2015 at 11:38 PM

So with the awesome release of Unity5, this issue is now not even an issue. Thus I guess this is solved.

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 HonoraryBob · May 26, 2015 at 07:11 PM

It's an issue for me: the same thing happened to me using Unity 5 when I made some buttons into children of a GO with a CanvasGroup.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

4.6 UI Dynamic button event system PointerEnter, PointerExit, PointerUp etc. 1 Answer

[4.6 - UI] Calling function on button click via script 1 Answer

[Solved]Why my Unity Button's Positions are different. 1 Answer

How to get screen position of a RectTransform when canvas render mode set to "Screen Space - Overlay" 1 Answer

Canvas buttons and fullscreen aspect ratio 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