Button Node with Label Child Issue

Button Node with Label Child Issue



I created a button node with a label child:

Then I set the button component to change colour when pressed:

And here is the button normal and pressed:

The button (with the share icon) is getting darker but the label child is not. How do I make the label child inherit the same effect (color transition) of its parent node when pressed? When I set the transition to scale, the label child scales as well, does this not work the same with colour transitions?

Thanks in advance!


I’m not a Cocos expert but I would say you need to create a script, attach it to the button(s) and propagate the pressed color state (or any state) to your child with the clickEvents


I have the same issue for disabling button.
Is there a way to listen button events like “onDisable”?