Browse Source

Merge pull request #98948 from Meorge/docs-clip-children

Add note to `CanvasItem.clip_children` about nesting
Thaddeus Crews 10 months ago
parent
commit
3e7d68da46
1 changed files with 1 additions and 0 deletions
  1. 1 0
      doc/classes/CanvasItem.xml

+ 1 - 0
doc/classes/CanvasItem.xml

@@ -594,6 +594,7 @@
 	<members>
 		<member name="clip_children" type="int" setter="set_clip_children_mode" getter="get_clip_children_mode" enum="CanvasItem.ClipChildrenMode" default="0">
 			Allows the current node to clip child nodes, essentially acting as a mask.
+			[b]Note:[/b] Clipping nodes cannot be nested or placed within [CanvasGroup]s. If an ancestor of this node clips its children or is a [CanvasGroup], then this node's clip mode should be set to [constant CLIP_CHILDREN_DISABLED] to avoid unexpected behavior.
 		</member>
 		<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1">
 			The rendering layers in which this [CanvasItem] responds to [Light2D] nodes.