How to set Layout of ColorRect in Node2D to Full Rect?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By HariSeldon

I have simple ColorRect in Node2D. When I try to set ColorRect layout to Full Rect it becomes invisible (and size is 0,0). How to fill Node2D with ColorRect?

Perhaps you should put the ColorRect node inside a CanvasLayer node instead of direct child of Node2D. You want to fill the full screen i assume?

p7f | 2020-06-29 16:08

Yes, I want to fill the full screen. And CanvasLayer works fine. Thank You.

HariSeldon | 2020-06-30 05:41

Thank you for the canvasLayer suggestions :slight_smile:

hoihoi8 | 2023-01-12 07:31

:bust_in_silhouette: Reply From: kidscancode

“Full Rect” sets the Control to fill the size of its parent. A Node2D has no size, so this is expected.