You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in the documentation, and in the comments to godotengine/godot#54211, to modulate the children of a CanvasGroup as a single combined texture, one must use the self_modulate property.
However, this is an infeasible solution if one wishes to fade out eg. an entire game UI, at once.
The method of tweening modulate:a on the root node of the scene means that this will propagate to all children - including the children of the CanvasGroup, which will fade out individually rather than as a combined group.
The current behaviour to me seems entirely unexpected and unintuitive, since treating the CanvasGroup's children as a single unit appears to be the entire point of the class existing:
Child CanvasItem nodes of a CanvasGroup are drawn as a single object. It allows to e.g. draw overlapping translucent 2D nodes without blending...
So I propose that CanvasGroup should prevent modulate from cascading to its children, and instead apply a self_modulate to itself - or something equivalent to that effect.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
As stated in the documentation, and in the comments to godotengine/godot#54211, to modulate the children of a
CanvasGroup
as a single combined texture, one must use theself_modulate
property.However, this is an infeasible solution if one wishes to fade out eg. an entire game UI, at once.
The method of tweening
modulate:a
on the root node of the scene means that this will propagate to all children - including the children of theCanvasGroup
, which will fade out individually rather than as a combined group.The current behaviour to me seems entirely unexpected and unintuitive, since treating the
CanvasGroup
's children as a single unit appears to be the entire point of the class existing:So I propose that
CanvasGroup
should preventmodulate
from cascading to its children, and instead apply aself_modulate
to itself - or something equivalent to that effect.Beta Was this translation helpful? Give feedback.
All reactions