Tweak CanvasGroup description to be more explicit about its purpose

This commit is contained in:
Hugo Locurcio 2025-11-12 23:26:29 +01:00
parent bd2ca13c6f
commit f71640e97a
No known key found for this signature in database
GPG key ID: 46ACE49F61685096

View file

@ -4,8 +4,8 @@
Merges several 2D nodes into a single draw operation.
</brief_description>
<description>
Child [CanvasItem] nodes of a [CanvasGroup] are drawn as a single object. It allows to e.g. draw overlapping translucent 2D nodes without blending (set [member CanvasItem.self_modulate] property of [CanvasGroup] to achieve this effect).
[b]Note:[/b] The [CanvasGroup] uses a custom shader to read from the backbuffer to draw its children. Assigning a [Material] to the [CanvasGroup] overrides the builtin shader. To duplicate the behavior of the builtin shader in a custom [Shader] use the following:
Child [CanvasItem] nodes of a [CanvasGroup] are drawn as a single object. It allows to e.g. draw overlapping translucent 2D nodes without causing the overlapping sections to be more opaque than intended (set the [member CanvasItem.self_modulate] property on the [CanvasGroup] to achieve this effect).
[b]Note:[/b] The [CanvasGroup] uses a custom shader to read from the backbuffer to draw its children. Assigning a [Material] to the [CanvasGroup] overrides the built-in shader. To duplicate the behavior of the built-in shader in a custom [Shader], use the following:
[codeblock]
shader_type canvas_item;
render_mode unshaded;