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
0
Question by hexagonius · Dec 10, 2015 at 06:54 PM · uibuttonimagechildrentint

Prevent Button from tinting child Images

I want a button to only Transition between colors on its own image, not on any of its children, or at least let me choose which ones. How can that be done?

A colleague of mine has created a button which had child objects, 2 texts, 2 images. The texts were tinted along with the button where the images were not.

Even more strange, I recreated that structure and could not get the images to not tint along with the button... every component was configured the same. even childing just the image over to the other button made it tint...

I took two shots. First shows the selected image, which is unaffected by the cursor hovering over the button The second one shows the affected one. IT'S A COPY OF THE FIRST. How is that possible?

Showing the unaffected image

Showing the affected image

screen-shot-2015-12-10-at-200215.png (153.6 kB)
screen-shot-2015-12-10-at-200230.png (150.5 kB)
Comment
Add comment · Show 4
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 callen · Dec 10, 2015 at 07:12 PM 0
Share

Buttons do not animate their children by default. I can't tell from your two images what the issue is... I see one icon as black and the other as blue, but this is because you set those colors in each Image component (one is white, other black). The images seem otherwise identical, so I can't tell what is going on if that isn't the issue.

avatar image hexagonius callen · Dec 10, 2015 at 07:28 PM 0
Share

Hey callen, thanks for the reply. the original color is blue. both shots were taken while hovering the button. the first buttons tint stays white, while the second gets black from the button due to tinting... I really genre no clue why one is ignored while the other, the copy, is not

avatar image callen · Dec 10, 2015 at 08:17 PM 0
Share

The Button component (which actually does the tint animations) is not shown, and the Image.Color in your screenshots matches the colors on-screen (as expected). This Image.Color is not changed during a Button tint animation (even if the final onscreen color is), so whether you were hovering over the button or not, the Inspector panel won't look any different than this.

$$anonymous$$aybe you need to add a screenshot of the Button component? Or maybe I'm missing something still :P

Edit: also to clear at least one thing up, the only graphic that is altered by a button's tint animation is the one assigned to Button.TargetGraphic.

avatar image hexagonius callen · Dec 10, 2015 at 11:15 PM 0
Share

well no, they don't match. the first is white (image), the second is black (image(2)). both are children of the same button with transition colors white to black. the screenshots were taken while hovering. why is one still white but the other became black. blue is the sprites color as is. IF the button was the only object changed I wouldn't be posting this. it references itself as targetgraphic

1 Reply

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

Answer by hexagonius · Dec 11, 2015 at 08:08 AM

Solved it,

some idiot derived from the button component, coloring every child Image in the hierarchy with an array of ignored once...

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

39 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

Related Questions

UI drag and drop 1 Answer

Drag handler is blocking image IPointerClick but not button OnClick 0 Answers

New UI Button: Have sprite fill entire button (overflow). 1 Answer

How to click on button that is behind transparent image in New UI? 2 Answers

Buttons become invisible when changing color (on Button or on Image) in script -1 Answers


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